-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc components on storybook (#117)
- Loading branch information
Franck Gaudin
authored
Dec 15, 2023
1 parent
eb5de30
commit 0cc460e
Showing
44 changed files
with
806 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
@import url("@/styles/tokens.css"); | ||
|
||
.hd-container { | ||
width: 100vw; | ||
height: 100vh; | ||
background-color: var(--hd-color-surface-primary); | ||
.shd-container { | ||
--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(--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"] { | ||
--sbt-container-background: var(--hd-neutral-900); | ||
--sbt-container-color: var(--hd-neutral-800); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import CopyButton from "./CopyButton"; | ||
|
||
const meta = { | ||
title: "Component/CopyButton", | ||
component: CopyButton, | ||
args: { | ||
text: "storybook is awesome" | ||
} | ||
} satisfies Meta<typeof CopyButton>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; | ||
|
||
export const Inline: Story = { | ||
args: { | ||
variant: "inline" | ||
} | ||
}; | ||
|
||
export const Ghost: Story = { | ||
args: { | ||
variant: "ghost", | ||
children: "this text can be copied in 1 click" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
apps/docs/components/copyButton/codeblockCopyButton/CodeBlockCopyButton.css
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
apps/docs/components/copyButton/codeblockCopyButton/CodeBlockCopyButton.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
.hd-copy-button { | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: transparent; | ||
border: none; | ||
border-radius: var(--hd-space-1); | ||
cursor: pointer; | ||
aspect-ratio: 1/1; | ||
border-radius: var(--hd-space-05); | ||
width: var(--hd-space-4); | ||
background-color: transparent; | ||
} | ||
|
||
.hd-copy-button:not([disabled]):hover { | ||
background-color: var(--hd-color-neutral-surface-weak); | ||
} | ||
|
||
.hd-copy-button__icon { | ||
stroke: currentcolor; | ||
} | ||
|
||
.hd-copy-button[disabled]:hover { | ||
cursor: not-allowed; | ||
} | ||
|
||
.hd-copy-button--inline { | ||
width: var(--hd-space-3); | ||
} | ||
|
||
.hd-copy-button--ghost { | ||
aspect-ratio: unset; | ||
width: auto; | ||
} | ||
|
||
.hd-copy-button--ghost:not([disabled]):hover { | ||
background-color: transparent; | ||
} |
14 changes: 0 additions & 14 deletions
14
apps/docs/components/copyButton/inlineCopyButton/InlineCopyButton.css
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
apps/docs/components/copyButton/inlineCopyButton/InlineCopyButton.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { IconTable } from "./IconTable"; | ||
|
||
const meta = { | ||
title: "Component/IconTable", | ||
component: IconTable | ||
} satisfies Meta<typeof IconTable>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
size: "lg", | ||
type: "react" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.