diff --git a/apps/docs/.storybook/global.css b/apps/docs/.storybook/global.css index c2932e6b1..16d728453 100644 --- a/apps/docs/.storybook/global.css +++ b/apps/docs/.storybook/global.css @@ -1,20 +1,20 @@ @import url("@/styles/tokens.css"); .shd-container { - --rs-landing-demo-bg: #fff; - --rs-landing-demo-dot-color: #e2e3e4; + --sbt-container-background: var(--hd-white); + --sbt-container-color: var(--hd-neutral-50); width: 100%; min-height: 100vh; padding: 2rem; background: - linear-gradient(90deg,var(--rs-landing-demo-bg) 10px,transparent 1%) 50%, - linear-gradient(var(--rs-landing-demo-bg) 10px,transparent 1%) 50%, - var(--rs-landing-demo-dot-color); + linear-gradient(90deg,var(--sbt-container-background) 10px,transparent 1%) 50%, + linear-gradient(var(--sbt-container-background) 10px,transparent 1%) 50%, + var(--sbt-container-color); background-size: 12px 12px; } [data-theme="dark"] { - --rs-landing-demo-bg: #1e1e1e; - --rs-landing-demo-dot-color: #2e2e2e; + --sbt-container-background: var(--hd-neutral-900); + --sbt-container-color: var(--hd-neutral-800); } diff --git a/apps/docs/components/copyButton/CopyButton.stories.tsx b/apps/docs/components/copyButton/CopyButton.stories.tsx index 88ef8dbea..d112b2881 100644 --- a/apps/docs/components/copyButton/CopyButton.stories.tsx +++ b/apps/docs/components/copyButton/CopyButton.stories.tsx @@ -2,31 +2,28 @@ import type { Meta, StoryObj } from "@storybook/react"; import CopyButton from "./CopyButton"; -const meta: Meta = { - title: "Component/Copy/Button", - component: CopyButton -}; +const meta = { + title: "Component/CopyButton", + component: CopyButton, + args: { + text: "storybook is awesome", + } +} satisfies Meta; export default meta; -type Story = StoryObj; +type Story = StoryObj; -export const Default: Story = { - args: { - text: "this text can be copied in 1 click", - children: "this text can be copied in 1 click" - }, -}; +export const Default: Story = {}; export const Inline: Story = { args: { - ...Default.args, variant: "inline" }, }; export const Ghost: Story = { args: { - ...Default.args, - variant: "ghost" + variant: "ghost", + children: "this text can be copied in 1 click" }, }; diff --git a/apps/docs/components/copyButton/CopyButton.tsx b/apps/docs/components/copyButton/CopyButton.tsx index 9162b8817..425fe6d0d 100644 --- a/apps/docs/components/copyButton/CopyButton.tsx +++ b/apps/docs/components/copyButton/CopyButton.tsx @@ -47,11 +47,7 @@ const CopyButton = ( : CopiedSvg ); - const content = ( - variant === "ghost" - ? children - : CopySvg - ); + const content = children ?? CopySvg return (