diff --git a/pkgs/clan-app/ui/icons/cursor.svg b/pkgs/clan-app/ui/icons/cursor.svg index 2d10ca437..cab084a40 100644 --- a/pkgs/clan-app/ui/icons/cursor.svg +++ b/pkgs/clan-app/ui/icons/cursor.svg @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/pkgs/clan-app/ui/src/components/Divider/Divider.css b/pkgs/clan-app/ui/src/components/Divider/Divider.css index 322c13035..b82f258f8 100644 --- a/pkgs/clan-app/ui/src/components/Divider/Divider.css +++ b/pkgs/clan-app/ui/src/components/Divider/Divider.css @@ -1,5 +1,5 @@ hr { - @apply border-none outline-none bg-inv-2; + @apply border-none outline-none bg-inv-2 self-stretch; &.inverted { @apply bg-def-3; diff --git a/pkgs/clan-app/ui/src/components/Icon/Icon.tsx b/pkgs/clan-app/ui/src/components/Icon/Icon.tsx index 0dfa24738..973a78137 100644 --- a/pkgs/clan-app/ui/src/components/Icon/Icon.tsx +++ b/pkgs/clan-app/ui/src/components/Icon/Icon.tsx @@ -102,6 +102,7 @@ export type IconVariant = keyof typeof icons; const viewBoxes: Partial> = { ClanIcon: "0 0 72 89", Offline: "0 0 38 27", + Cursor: "0 0 35 42", }; export interface IconProps extends JSX.SvgSVGAttributes { diff --git a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css new file mode 100644 index 000000000..ee40a2e39 --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css @@ -0,0 +1,30 @@ +div.toolbar { + @apply flex flex-row items-center justify-center gap-1.5 p-1 size-fit rounded-md self-stretch; + + border: 0.0625rem solid theme(colors.off.toolbar_border); + background: linear-gradient( + 180deg, + theme(colors.bg.inv.3) 0%, + theme(colors.bg.inv.4) 100% + ); + + & > hr { + @apply h-full min-h-8; + } + + & > button.toolbar-button { + @apply w-6 h-6 p-1 rounded-[0.25rem]; + + &:hover { + @apply bg-inv-1; + } + + &:active { + @apply bg-inv-4; + } + + &.selected { + @apply bg-bg-semantic-success-4; + } + } +} diff --git a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.stories.tsx b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.stories.tsx new file mode 100644 index 000000000..2ad5e7c7a --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.stories.tsx @@ -0,0 +1,27 @@ +import { Meta, StoryObj } from "@kachurun/storybook-solid"; +import { Toolbar, ToolbarProps } from "@/src/components/Toolbar/Toolbar"; +import { Divider } from "@/src/components/Divider/Divider"; +import { ToolbarButton } from "./ToolbarButton"; + +const meta: Meta = { + title: "Components/Toolbar", + component: Toolbar, +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + children: ( + <> + + + + + + + ), + }, +}; diff --git a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx new file mode 100644 index 000000000..6c347a1db --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx @@ -0,0 +1,14 @@ +import "./Toolbar.css"; +import { JSX } from "solid-js"; + +export interface ToolbarProps { + children: JSX.Element; +} + +export const Toolbar = (props: ToolbarProps) => { + return ( + + ); +}; diff --git a/pkgs/clan-app/ui/src/components/Toolbar/ToolbarButton.tsx b/pkgs/clan-app/ui/src/components/Toolbar/ToolbarButton.tsx new file mode 100644 index 000000000..b271d7b95 --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Toolbar/ToolbarButton.tsx @@ -0,0 +1,22 @@ +import "./Toolbar.css"; +import cx from "classnames"; +import { Button } from "@kobalte/core/button"; +import Icon, { IconVariant } from "@/src/components/Icon/Icon"; +import type { JSX } from "solid-js"; + +export interface ToolbarButtonProps + extends JSX.ButtonHTMLAttributes { + icon: IconVariant; + selected?: boolean; +} + +export const ToolbarButton = (props: ToolbarButtonProps) => { + return ( + + ); +}; diff --git a/pkgs/clan-app/ui/tailwind/core-plugin.ts b/pkgs/clan-app/ui/tailwind/core-plugin.ts index 4148b1371..4e1a6d74f 100644 --- a/pkgs/clan-app/ui/tailwind/core-plugin.ts +++ b/pkgs/clan-app/ui/tailwind/core-plugin.ts @@ -13,6 +13,7 @@ const primaries = { black: toRGB("#000000"), darknet_name: toRGB("#00ff57"), darknet_label: toRGB("#2cff74"), + toolbar_border: toRGB("#2e4a4b"), }, primary: { 50: toRGB("#f4f9f9"),