mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 04:14:12 +01:00
icons
This commit is contained in:
1 parent
f10065887d
commit
10f8fa28f9
11 files changed
+121
-81
No files matched your search
@@ -0,0 +1,4 @@
|
||||
.sidebar-icon-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { ComponentProps } from "react";
|
||||
import { classNames } from "../../ui/classNames";
|
||||
import type { ButtonProps } from "../Button";
|
||||
import { IconButton } from "../IconButton";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
type SidebarIconButtonProps = ButtonProps & {
|
||||
selected: boolean;
|
||||
src: string;
|
||||
alt: string;
|
||||
};
|
||||
|
||||
export function SidebarIconGroup({
|
||||
className,
|
||||
...props
|
||||
}: ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
className={classNames(styles["sidebar-icon-group"], className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: sunset this
|
||||
export function SidebarIconButton({
|
||||
selected,
|
||||
src,
|
||||
alt,
|
||||
...props
|
||||
}: SidebarIconButtonProps) {
|
||||
return (
|
||||
<IconButton
|
||||
parentListChild="vertical"
|
||||
color={selected ? undefined : "gray"}
|
||||
variant="soft"
|
||||
size="major"
|
||||
{...props}
|
||||
>
|
||||
<img alt={alt} src={src} />
|
||||
</IconButton>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user