Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: docs improvements #83

Merged
merged 1 commit into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 56 additions & 13 deletions src/components/Badge/Badge.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,45 +115,88 @@ export const ButtonTemplate = (args) => ({

# Badges

## Overview

<Canvas>
<Story
name="Right"
name="Overview"
argTypes={{ ...Default.argTypes }}
args={{ placement: 'right' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Playground

<ArgsTable story="Overview" />

## Stories

### Right

<Canvas>
<Story
name="Left"
name="Right"
argTypes={{ ...Default.argTypes }}
args={{ placement: 'left' }}
args={{ placement: 'right' }}
>
{Default.bind({})}
</Story>
</Canvas>

### With Content

<Canvas>
<Story
name="Bottom"
name="With Content"
argTypes={{ ...ButtonTemplate.argTypes }}
args={{ content: '1' }}
>
{ButtonTemplate.bind({})}
</Story>
</Canvas>

### With Icon

<Canvas>
<Story
name="With Icon"
argTypes={{ ...Default.argTypes }}
args={{ placement: 'bottom' }}
args={{ icon: 'cancel' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Hover

<Canvas>
<Story name="Hover" argTypes={{ ...Default.argTypes }} args={{ hover: true }}>
{Default.bind({})}
</Story>
</Canvas>

### Bottom

<Canvas>
<Story
name="With Icon"
name="Bottom"
argTypes={{ ...Default.argTypes }}
args={{ icon: 'cancel' }}
args={{ placement: 'bottom' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Left

<Canvas>
<Story
name="With Content"
argTypes={{ ...ButtonTemplate.argTypes }}
args={{ content: '1' }}
name="Left"
argTypes={{ ...Default.argTypes }}
args={{ placement: 'left' }}
>
{ButtonTemplate.bind({})}
{Default.bind({})}
</Story>
</Canvas>

<ArgsTable story="Right" />
46 changes: 27 additions & 19 deletions src/components/Button/Button.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,29 @@ export const Default = ({ slot1, slot2, ...rest }) => {
};
};

# Primary
# Button

<Canvas>
<Story
name="Overview"
argTypes={{ ...Default.argTypes }}
args={{
variant: 'primary',
icon: 'add_circle',
slot1: '<span>Primary</span>',
}}
>
{Default.bind({})}
</Story>
</Canvas>

### Playground

<ArgsTable story="Overview" />

## Stories

### Primary

<Canvas>
<Story
Expand All @@ -116,7 +138,7 @@ export const Default = ({ slot1, slot2, ...rest }) => {
</Story>
</Canvas>

# Secondary
### Secondary

<Canvas>
<Story
Expand All @@ -131,7 +153,7 @@ export const Default = ({ slot1, slot2, ...rest }) => {
</Story>
</Canvas>

# Icon
### Icon

<Canvas>
<Story
Expand All @@ -146,7 +168,7 @@ export const Default = ({ slot1, slot2, ...rest }) => {
</Story>
</Canvas>

# Text
### Text

<Canvas>
<Story
Expand All @@ -161,7 +183,7 @@ export const Default = ({ slot1, slot2, ...rest }) => {
</Story>
</Canvas>

# Outline
### Outline

<Canvas>
<Story
Expand All @@ -175,17 +197,3 @@ export const Default = ({ slot1, slot2, ...rest }) => {
{Default.bind({})}
</Story>
</Canvas>

# Reference

<ArgsTable />

# Usage

```html
Default template
```

```js
Default template
```
27 changes: 23 additions & 4 deletions src/components/Checkbox/Checkbox.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ export const Default = (args) => {
};
};

# Default
# Checkbox

<Canvas>
<Story
name="Default"
name="Overview"
argTypes={{ ...Default.argTypes }}
args={{
id: 'checkbox-1',
Expand All @@ -86,6 +86,25 @@ export const Default = (args) => {
</Story>
</Canvas>

# Reference
### Playground

<ArgsTable story="Overview" />

## Stories

<ArgsTable />
### Default

<Canvas>
<Story
name="Default"
argTypes={{ ...Default.argTypes }}
args={{
id: 'checkbox-1',
label: 'Deneme',
right: false,
indeterminate: true,
}}
>
{Default.bind({})}
</Story>
</Canvas>
51 changes: 49 additions & 2 deletions src/components/Chips/Chip.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,52 +78,101 @@ export const Default = (args) => ({

# Chips

<Canvas>
<Story name="Overview" argTypes={{ ...Default.argTypes }} args={{}}>
{Default.bind({})}
</Story>
</Canvas>

### Playground

<ArgsTable story="Overview" />

## Stories

### Primary

<Canvas>
<Story name="Primary" argTypes={{ ...Default.argTypes }} args={{}}>
{Default.bind({})}
</Story>
</Canvas>

### Secondary

<Canvas>
<Story
name="Secondary"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'secondary' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Success

<Canvas>
<Story
name="Success"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'success' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Danger

<Canvas>
<Story
name="Danger"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'danger' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Warning

<Canvas>
<Story
name="Warning"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'warning' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Info

<Canvas>
<Story
name="Info"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'info' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Light

<Canvas>
<Story
name="Light"
argTypes={{ ...Default.argTypes }}
args={{ variant: 'light' }}
>
{Default.bind({})}
</Story>
</Canvas>

### Dark

<Canvas>
<Story
name="Dark"
argTypes={{ ...Default.argTypes }}
Expand All @@ -132,5 +181,3 @@ export const Default = (args) => ({
{Default.bind({})}
</Story>
</Canvas>

<ArgsTable story="Primary" />
18 changes: 15 additions & 3 deletions src/components/Dropdown/Dropdown.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,25 @@ export const WithIcon = (args) => {
};
};

# Dropdown

<Canvas>
<Story name="Overview" argTypes={{ ...Default.argTypes }} args={{}} />
</Canvas>

### Playground

<ArgsTable story="Overview" />

## Stories

### Default

<Canvas>
<Story name="Default" argTypes={{ ...Default.argTypes }} args={{}} />
</Canvas>

<ArgsTable story="Default" />
### With Icon

<Canvas>
<Story
Expand All @@ -254,5 +268,3 @@ export const WithIcon = (args) => {
args={{ content: '', autoSize: false }}
/>
</Canvas>

<ArgsTable story="With Icon" />
Loading