Skip to content

Commit

Permalink
docs: refactor
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Dec 15, 2024
1 parent 6277011 commit a3411d7
Show file tree
Hide file tree
Showing 21 changed files with 718 additions and 393 deletions.
217 changes: 118 additions & 99 deletions content/2.components/1.prose.md

Large diffs are not rendered by default.

157 changes: 109 additions & 48 deletions content/2.components/2.docs/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,88 +10,149 @@ badges:
target: _blank
---

::code-group
::div{label="Preview" class="md:p-4"}
::alert{icon="lucide:info"}
A **default** alert with `code` and a [link](/).
::
## Usage

::alert{type="secondary" icon="lucide:info"}
A **secondary** alert with `code` and a [link](/).
::
::stack
::div{class="p-4"}
::alert{icon="lucide:info"}
A **default** alert with `code` and a [link](/).
::

::alert{type="secondary" icon="lucide:info"}
A **secondary** alert with `code` and a [link](/).
::
::
```mdc
::alert{icon="lucide:info"}
A **default** alert with `code` and a [link](/).
::
::alert{type="secondary" icon="lucide:info"}
A **secondary** alert with `code` and a [link](/).
::
```
::

### Link

::stack
::div{class="p-4"}
::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
A **link** alert.
::
::
```mdc
::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
A **link** alert.
::
```
::

### Variants

::tabs{variant="line"}
::stack{label="info" icon="lucide:info"}
::div{class="p-3"}
::alert{type="info" icon="lucide:info"}
An **info** alert with `code` and a [link](/).
::
::
```mdc
::alert{type="info" icon="lucide:info"}
An **info** alert with `code` and a [link](/).
::
```
::

::stack{label="note" icon="lucide:pencil"}
::div{class="p-3"}
::alert{type="note" icon="lucide:pencil"}
A **note** alert with `code` and a [link](/).
::
::
```mdc
::alert{type="note" icon="lucide:pencil"}
A **note** alert with `code` and a [link](/).
::
```
::

::stack{label="success" icon="lucide:lightbulb"}
::div{class="p-3"}
::alert{type="success" icon="lucide:lightbulb"}
A **success** alert with `code` and a [link](/).
::
::
```mdc
::alert{type="success" icon="lucide:lightbulb"}
A **success** alert with `code` and a [link](/).
::
```
::

::stack{label="example" icon="lucide:test-tube"}
::div{class="p-3"}
::alert{type="example" icon="lucide:test-tube"}
An **example** alert with `code` and a [link](/).
::
::
```mdc
::alert{type="example" icon="lucide:test-tube"}
An **example** alert with `code` and a [link](/).
::
```
::

::stack{label="warning" icon="lucide:triangle-alert"}
::div{class="p-3"}
::alert{type="warning" icon="lucide:triangle-alert"}
A **warning** alert with `code` and a [link](/).
::
::
```mdc
::alert{type="warning" icon="lucide:triangle-alert"}
A **warning** alert with `code` and a [link](/).
::
```
::

::stack{label="danger" icon="lucide:circle-x"}
::div{class="p-3"}
::alert{type="danger" icon="lucide:circle-x"}
A **danger** alert with `code` and a [link](/).
::

::alert{title="Title" icon="lucide:layout-list"}
An alert with a title.
::

::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
A **link** alert.
```mdc
::alert{type="danger" icon="lucide:circle-x"}
A **danger** alert with `code` and a [link](/).
::
```
::
::

```mdc [Code]
::alert{icon="lucide:info"}
A **default** alert with `code` and a [link](/).
::
::alert{type="secondary" icon="lucide:info"}
A **secondary** alert with `code` and a [link](/).
::
::alert{type="info" icon="lucide:info"}
An **info** alert with `code` and a [link](/).
::
::alert{type="note" icon="lucide:pencil"}
A **note** alert with `code` and a [link](/).
::
::alert{type="success" icon="lucide:lightbulb"}
A **success** alert with `code` and a [link](/).
::
### Title

::alert{type="example" icon="lucide:test-tube"}
An **example** alert with `code` and a [link](/).
::
::alert{type="warning" icon="lucide:triangle-alert"}
A **warning** alert with `code` and a [link](/).
::stack
::div{class="p-4"}
::alert{title="Title" icon="lucide:layout-list"}
An alert with a title.
::
::alert{type="danger" icon="lucide:circle-x"}
A **danger** alert with `code` and a [link](/).
::
```mdc
::alert{title="Title" icon="lucide:layout-list"}
An alert with a title.
::
::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
A **link** alert.
::
```
::

## Props

::field-group
:field{name="title" type="string"}[Alert title]
:field{name="icon" type="string"}[Alert icon]
:field{name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'" default-value="'default'"}
:field{name="to" type="string"}[Link URL]
:field{name="target" type="Target"}[A `target` attribute value to apply on the link]
:field{name="external" type="boolean"}[Alias to `target='_blank'`]
:field{name="showLinkIcon" type="boolean" default-value="true"}[Whether to show the link indicator :icon{name="lucide:arrow-up-right"}]
::
123 changes: 96 additions & 27 deletions content/2.components/2.docs/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,115 @@ badges:
target: _blank
---

::code-group
::div{label="Preview" class="md:p-4"}
::badge
Default
## Usage

::stack
::div{class="p-3"}
::badge
Default
::
::badge{size="sm"}
Small
::
::
```mdc
::badge
Default
::
::badge{size="sm"}
Small
::
```
::

### Variants

::tabs{variant="line"}
::stack{label="outline"}
::div{class="p-3"}
:badge[Outline]{variant="outline"}
::
::badge{size="sm"}
Small
```mdc
:badge[Outline]{variant="outline"}
```
::

::stack{label="secondary"}
::div{class="p-3"}
:badge[Secondary]{variant="secondary"}
::
```mdc
:badge[Secondary]{variant="secondary"}
```
::

::stack{label="info"}
::div{class="p-3"}
:badge[Info]{type="info"}
::
::badge{type="info"}
Info
```mdc
:badge[Info]{type="info"}
```
::

::stack{label="warning"}
::div{class="p-3"}
:badge[Warning]{type="warning"}
::
```mdc
:badge[Warning]{type="warning"}
```
::

::stack{label="success"}
::div{class="p-3"}
:badge[Success]{type="success"}
::
```mdc
:badge[Success]{type="success"}
```
::

::stack{label="lime"}
::div{class="p-3"}
:badge[lime]{type="lime"}
:badge[Danger]{type="danger"}
:badge[Outline]{variant="outline"}
:badge[Secondary]{variant="secondary"}
::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
Link
::
```mdc
:badge[lime]{type="lime"}
```
::

```mdc [Code]
::badge
Default
::stack{label="danger"}
::div{class="p-3"}
:badge[Danger]{type="danger"}
::
```mdc
:badge[Danger]{type="danger"}
```
::
::badge{size="sm"}
Small
::

### Link

::stack
::div{class="p-3"}
::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
Link
::
::badge{type="info"}
Info
::
:badge[Warning]{type="warning"}
:badge[Success]{type="success"}
:badge[lime]{type="lime"}
:badge[Danger]{type="danger"}
:badge[Outline]{variant="outline"}
:badge[Secondary]{variant="secondary"}
```mdc
::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
Link
Link
::
```
::

## Props

::field-group
:field{name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'lime'" default-value="'default'"}
:field{name="variant" type="'default' | 'secondary' | 'destructive' | 'outline'" default-value="'default'"}
:field{name="size" type="'md' | 'sm'" default-value="'md'"}
:field{name="to" type="string"}[Link URL]
:field{name="target" type="Target"}[A `target` attribute value to apply on the link]
::
45 changes: 36 additions & 9 deletions content/2.components/2.docs/button-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,42 @@ badges:
- value: 0.6.5
---

::code-group
::div{label="Preview" class="md:p-4 flex gap-4"}
:button-link[Get Started]{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
:button-link[GitHub]{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
:button-link[Ghost]{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
## Usage

::stack
::div{class="p-3 flex gap-4"}
::button-link{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
Get Started
::
::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
GitHub
::
::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
Ghost
::
::
```mdc
::button-link{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
Get Started
::
::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
GitHub
::
::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
Ghost
::
```mdc [Code]
:button-link[Get Started]{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
:button-link[GitHub]{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
:button-link[Ghost]{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
```
::

## Props

::field-group
:field{name="variant" type="'default' | 'secondary' | 'link' | 'destructive' | 'outline' | 'ghost'" default-value="'default'"}
:field{name="size" type="'default' | 'icon' | 'sm' | 'xs' | 'lg'" default-value="'default'"}
:field{name="leftIcon" type="string"}[Icon on the left]
:field{name="rightIcon" type="string"}[Icon on the right]
:field{name="to" type="string"}[Link URL]
:field{name="href" type="string"}[Alias to `to`]
:field{name="target" type="Target"}[A `target` attribute value to apply on the link]
:field{name="blank" type="boolean"}[Alias to `target='_blank'`]
::
Loading

0 comments on commit a3411d7

Please sign in to comment.