Skip to content

Commit

Permalink
docs(app): #69 divider
Browse files Browse the repository at this point in the history
Closes: #69
  • Loading branch information
Selemondev authored and Selemondev committed Aug 8, 2023
1 parent 8f0a343 commit f1d6a43
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default defineConfig({
{ text: 'Badge', link: '/guide/components/badge.md'},
{ text: 'Button', link: '/guide/components/button.md'},
{ text: 'Checkbox', link: '/guide/components/checkbox.md'},
{ text: 'Divider', link: '/guide/components/divider.md'}
]
}
],
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/components/Divider/dividerBasic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div class="grid place-items-center w-full">
<div>
<p class="dark:text-white">Nuxt.js is a popular open-source framework for building web applications with Vue.js. It simplifies the process of creating server-rendered Vue applications and provides various features to enhance development</p>
<WDivider/>
<p class="dark:text-white">Next.js is a popular open-source React framework for building web applications</p>
</div>
</div>
</template>
13 changes: 13 additions & 0 deletions docs/docs/components/Divider/dividerVertical.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div class="grid place-items-center w-full">
<div class="space-x-2 flex items-center">
<span class="dark:text-white">Nuxt.js</span>
<WDivider vertical />
<span class="dark:text-white">Next.js</span>
<WDivider vertical />
<span class="dark:text-white">Vue.js</span>
<WDivider vertical />
<span class="dark:text-white">React.js</span>
</div>
</div>
</template>
37 changes: 37 additions & 0 deletions docs/docs/guide/components/divider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Divider
lang: en-US
---

# Divider

A Divider is an element used to separate content or sections in a user interface.

## Basic Usage

You can use the `WDivider` component as shown below:

<demo src="../../components/Divider/dividerBasic.vue" />

## Vertical

You can use the `vertical` prop to make the `WDivider` component align vertically as shown below:

<demo src="../../components/Divider/dividerVertical.vue" />

## Preset

```js
WDivider: {
base: {
root: 'w-full h-px',
dividerVertical: 'relative !w-px !h-4 !inline-block',
},
variants: {
default: {
root: 'bg-gray-400 dark:bg-zinc-600',
},
},
},
```

0 comments on commit f1d6a43

Please sign in to comment.