diff --git a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.module.css similarity index 57% rename from pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css rename to pkgs/clan-app/ui/src/components/Toolbar/Toolbar.module.css index ee40a2e39..3341e8ee7 100644 --- a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.css +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.module.css @@ -1,4 +1,4 @@ -div.toolbar { +.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); @@ -11,20 +11,20 @@ div.toolbar { & > hr { @apply h-full min-h-8; } +} - & > button.toolbar-button { - @apply w-6 h-6 p-1 rounded-[0.25rem]; +.toolbar_button { + @apply w-6 h-6 p-1 rounded-[0.25rem]; - &:hover { - @apply bg-inv-1; - } + &:hover { + @apply bg-inv-1; + } - &:active { - @apply bg-inv-4; - } + &:active { + @apply bg-inv-4; + } - &.selected { - @apply bg-bg-semantic-success-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 index 2ad5e7c7a..68bddf533 100644 --- a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.stories.tsx +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.stories.tsx @@ -2,6 +2,8 @@ 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"; +import { Tooltip } from "../Tooltip/Tooltip"; +import { Typography } from "../Typography/Typography"; const meta: Meta = { title: "Components/Toolbar", @@ -25,3 +27,63 @@ export const Default: Story = { ), }, }; + +export const WithTooltip: Story = { + // @ts-expect-error: args in storybook is not typed correctly. This is a storybook issue. + render: (args) => ( +
+
+ +
+
+ ), + args: { + children: ( + <> + } + placement="top" + > +
+ + Select an object + +
+
+ + } + placement="top" + > +
+ + Create a new machine + +
+
+ + } + placement="top" + > +
+ + Manage Services + +
+
+ } + placement="top" + > +
+ + Chat with AI + +
+
+ + ), + }, +}; diff --git a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx index 6c347a1db..b79b1f620 100644 --- a/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx +++ b/pkgs/clan-app/ui/src/components/Toolbar/Toolbar.tsx @@ -1,5 +1,5 @@ -import "./Toolbar.css"; import { JSX } from "solid-js"; +import styles from "./Toolbar.module.css"; export interface ToolbarProps { children: JSX.Element; @@ -7,7 +7,7 @@ export interface ToolbarProps { export const Toolbar = (props: ToolbarProps) => { return ( -