Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 102be89

Browse files
committed
docs(c-code): add c-code documentation
1 parent a69d74c commit 102be89

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/.vitepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function getSetupSidebar() {
5555
{ text: 'Alert', link: '/components/alert' },
5656
{ text: 'Badge', link: '/components/badge' },
5757
{ text: 'Button', link: '/components/button' },
58+
{ text: 'Code', link: '/components/code' },
5859
{ text: 'Icon', link: '/components/icon' },
5960
{ text: 'Spinner', link: '/components/spinner' },
6061
{ text: 'CSS reset', link: '/components/css-reset' },

docs/components/code.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Code
2+
3+
Code is a component used to display inline code. It is composed from the Box component with a font family of `mono` for displaying code.
4+
5+
## Import
6+
7+
```js
8+
import { CCode } from "@chakra-ui/vue-next"
9+
```
10+
11+
## Usage
12+
```vue
13+
<c-code>hello world</c-code>
14+
```
15+
16+
### Code Color
17+
18+
Pass the `colorScheme` prop to customize the color of the Badge. `colorScheme` can be any **color key** that exists in `theme.colors`.
19+
20+
TODO: Link to theming page
21+
22+
```vue
23+
<c-code>hello world, default</c-code>
24+
<c-code color-scheme="green">hello world, green</c-code>
25+
<c-code color-scheme="red">hello world, red</c-code>
26+
<c-code color-scheme="purple">hello world, purple</c-code>
27+
```
28+
29+
## Props
30+
31+
| Name | Type | Description | Default |
32+
| :---: | :---: | :---: | :---: |
33+
|`colorScheme`|`string`|Color Scheme to be applied|"cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "whiteAlpha" | "blackAlpha" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"`|`"gray"`|

0 commit comments

Comments
 (0)