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

docs(app): #70 icon #87

Merged
merged 1 commit into from
Aug 8, 2023
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
3 changes: 2 additions & 1 deletion docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ 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'}
{ text: 'Divider', link: '/guide/components/divider.md'},
{ text: 'Icon', link: '/guide/components/icon.md'},
]
}
],
Expand Down
12 changes: 12 additions & 0 deletions docs/docs/components/Icon/iconBasic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="grid place-items-center w-full">
<div class="flex space-x-3">
<WIcon name="logos:windi-css" />
<WIcon name="logos:nuxt-icon"/>
<WIcon name="logos:vue" />
<WIcon name="logos:vueuse" />
<WIcon name="logos:vuetifyjs" />
<WIcon name="logos:gridsome-icon" />
</div>
</div>
</template>
15 changes: 15 additions & 0 deletions docs/docs/components/Icon/iconSize.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div class="grid place-items-center w-full">
<div class="flex space-x-3">
<WIcon name="logos:windi-css" size="8xl" />
<WIcon name="logos:nuxt-icon" size="6xl" />
<WIcon name="logos:vue" size="4xl" />
<WIcon name="logos:vueuse" size="2xl" />
<WIcon name="logos:vuetifyjs" size="xl" />
<WIcon name="logos:gridsome-icon" size="lg" />
<WIcon name="devicon:react" size="base" />
<WIcon name="logos:react-query-icon" size="sm" />
<WIcon name="logos:svelte-icon" size="xs" />
</div>
</div>
</template>
47 changes: 47 additions & 0 deletions docs/docs/guide/components/icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Icon
lang: en-US
---

# Icon

Icons are used to visually represent objects or concepts and allow users to interact with them by clicking or tapping on them.

## Basic Usage

<demo src="../../components/Icon/iconBasic.vue" />

## Size

You can increase the size of the `WIcon` component by passing a size to the `size` prop as shown below:

<demo src="../../components/Icon/iconSize.vue" />

By default, the `WIcon` component's size is `base`

## Preset

```js
WIcon: {
base: {
'root': 'block cursor-pointer',
'normal': 'text-base',
'xs': 'text-xs',
'sm': 'text-sm',
'base': 'text-base',
'lg': 'text-lg',
'xl': 'text-xl',
'2xl': 'text-2xl',
'3xl': 'text-3xl',
'4xl': 'text-4xl',
'6xl': 'text-6xl',
'8xl': 'text-8xl',
},

variants: {
default: {
root: 'block cursor-pointer',
},
},
},
```