-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
179 additions
and
21 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
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 |
---|---|---|
|
@@ -64,4 +64,3 @@ | |
"webpack": "^5.86.0" | ||
} | ||
} | ||
|
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,27 @@ | ||
import CodeBlock from "./CodeBlock"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof CodeBlock> = { | ||
title: "ui/CodeBlock", | ||
component: CodeBlock, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof CodeBlock>; | ||
|
||
export const HTML: Story = { | ||
args: { | ||
code: '<div class="bg-red-500">Hello</div>', | ||
language: "xml", | ||
}, | ||
}; | ||
|
||
export const JavaScript: Story = { | ||
args: { | ||
code: `const greet = (name) => { | ||
console.log(\`Hello, \${name}!\`); | ||
}`, | ||
language: "javascript", | ||
}, | ||
}; |
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,28 @@ | ||
import Input from "./Input"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof Input> = { | ||
title: "ui/Input", | ||
component: Input, | ||
tags: ["autodocs"], | ||
args: { | ||
placeholder: "This is a placeholder", | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Input>; | ||
|
||
export const Primary: Story = {}; | ||
|
||
export const Secondary: Story = { | ||
args: { | ||
variant: "secondary", | ||
}, | ||
}; | ||
|
||
export const Danger: Story = { | ||
args: { | ||
variant: "danger", | ||
}, | ||
}; |
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 Link from "./Link"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof Link> = { | ||
title: "ui/Link", | ||
component: Link, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Link>; | ||
|
||
export const GitHub: Story = { | ||
args: { | ||
children: "GitHub", | ||
href: "https://github.com/0l1v3rr/github-readme-tech-stack", | ||
}, | ||
}; |
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,32 @@ | ||
import Quote from "./Quote"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof Quote> = { | ||
title: "ui/Quote", | ||
component: Quote, | ||
tags: ["autodocs"], | ||
args: { | ||
children: "This is a quote.", | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Quote>; | ||
|
||
export const Info: Story = { | ||
args: { | ||
variant: "Info", | ||
}, | ||
}; | ||
|
||
export const Note: Story = { | ||
args: { | ||
variant: "Note", | ||
}, | ||
}; | ||
|
||
export const Warning: Story = { | ||
args: { | ||
variant: "Warning", | ||
}, | ||
}; |
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 Select from "./Select"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof Select> = { | ||
title: "ui/Select", | ||
component: Select, | ||
// tags: ["autodocs"], | ||
args: { | ||
options: [ | ||
{ label: "Hungary", value: "hungary" }, | ||
{ label: "UK", value: "uk" }, | ||
{ label: "USA", value: "usa" }, | ||
], | ||
select: () => {}, | ||
selected: { label: "Hungary", value: "hungary" }, | ||
label: "Countries", | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Select>; | ||
|
||
export const BasicSelect: Story = {}; | ||
|
||
export const WithFilter: Story = { | ||
args: { | ||
filter: true, | ||
}, | ||
}; |
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,21 @@ | ||
import TrueFalseInput from "./TrueFalseInput"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof TrueFalseInput> = { | ||
title: "ui/TrueFalseInput", | ||
component: TrueFalseInput, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof TrueFalseInput>; | ||
|
||
export const YesOrNo: Story = { | ||
args: { | ||
value: true, | ||
setValue: () => {}, | ||
trueLabel: "Yes", | ||
falseLabel: "No", | ||
className: "w-32", | ||
}, | ||
}; |
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