-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from selemondev/docs/kbd
docs(app): #72 kbd
- Loading branch information
Showing
5 changed files
with
85 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div class="grid place-items-center w-full"> | ||
<div class="flex space-x-2"> | ||
<WKbd>A</WKbd> | ||
<WKbd>B</WKbd> | ||
<WKbd>C</WKbd> | ||
<WKbd>D</WKbd> | ||
<WKbd>E</WKbd> | ||
<WKbd>F</WKbd> | ||
<WKbd>G</WKbd> | ||
<WKbd>H</WKbd> | ||
<WKbd>I</WKbd> | ||
<WKbd>J</WKbd> | ||
<WKbd>@</WKbd> | ||
</div> | ||
</div> | ||
</template> |
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,11 @@ | ||
<template> | ||
<div class="grid place-items-center w-full"> | ||
<div class="flex space-x-2"> | ||
<WKbd size="xs">A</WKbd> | ||
<WKbd size="sm">B</WKbd> | ||
<WKbd size="md">C</WKbd> | ||
<WKbd size="lg">D</WKbd> | ||
<WKbd size="xl">E</WKbd> | ||
</div> | ||
</div> | ||
</template> |
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,55 @@ | ||
--- | ||
title: Kbd | ||
lang: en-US | ||
--- | ||
|
||
# Kbd | ||
|
||
A Kbd, also known as a keyboard UI component, is a user interface element that is designed to represent a keyboard or keyboard-like input. | ||
|
||
## Basic Usage | ||
|
||
You can use the default slot to set the text of the `WKbd` component as shown below: | ||
|
||
<demo src="../../components/Kbd/kbd.vue" /> | ||
|
||
## Size | ||
|
||
You can set the size of the `WKbd` component by using the `size` prop as shown below: | ||
|
||
<demo src="../../components/Kbd/kbdSize.vue" /> | ||
|
||
By default, the `WKbd` component's size is set to `sm`. | ||
|
||
## Preset | ||
|
||
```js | ||
|
||
WKbd: { | ||
base: { | ||
root: 'inline-flex items-center justify-center text-gray-900 px-1 dark:text-white', | ||
KbdRounded: 'rounded', | ||
KbdFont: 'font-medium', | ||
KbdBackground: 'bg-gray-100 dark:bg-gray-800', | ||
KbdRing: 'ring-1 ring-gray-300 ring-inset dark:ring-gray-700', | ||
KbdSize: { | ||
xs: 'h-4 min-w-[16px] text-[10px]', | ||
sm: 'h-5 min-w-[20px] text-[11px]', | ||
md: 'h-6 min-w-[24px] text-[12px]', | ||
lg: 'h-7 min-w-[28px] text-[13px]', | ||
xl: 'h-8 min-w-[32px] text-[14px]', | ||
}, | ||
}, | ||
|
||
variants: { | ||
default: { | ||
root: 'inline-flex items-center justify-center text-gray-900 px-1 dark:text-white', | ||
KbdRounded: 'rounded', | ||
KbdFont: 'font-medium', | ||
KbdBackground: 'bg-gray-100 dark:bg-gray-800', | ||
KbdRing: 'ring-1 ring-gray-300 ring-inset dark:ring-gray-700', | ||
}, | ||
}, | ||
}, | ||
|
||
``` |
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