-
-
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.
docs: the avatar and checkbox component is documented (#397)
Issue #390 Finished checkbox
- Loading branch information
Showing
5 changed files
with
108 additions
and
23 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
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 |
---|---|---|
@@ -1,4 +1,73 @@ | ||
--- | ||
title: Checkbox | ||
description: A checkbox is a user interface element that allows users to select one or more options from a set of options. | ||
--- | ||
--- | ||
|
||
# Imports | ||
|
||
- **Checkbox**: The main component to display a list of accordion items. | ||
|
||
## Usage | ||
|
||
<Checkbox /> | ||
|
||
```jsx | ||
import {Checkbox} from '@openlite/ui' | ||
|
||
function App() { | ||
return( | ||
<Checkbox /> | ||
) | ||
} | ||
``` | ||
|
||
## Examples | ||
|
||
### Variants | ||
|
||
<Checkbox /> | ||
<Checkbox variant="primary" /> | ||
<Checkbox variant="success" /> | ||
<Checkbox variant="error" /> | ||
<Checkbox variant="warn" /> | ||
|
||
```jsx | ||
import {Checkbox} from '@openlite/ui' | ||
|
||
function App() { | ||
return( | ||
<Checkbox /> | ||
<Checkbox variant="primary" /> | ||
<Checkbox variant="success" /> | ||
<Checkbox variant="error" /> | ||
<Checkbox variant="warn" /> | ||
) | ||
} | ||
``` | ||
|
||
### Rounded | ||
|
||
<Checkbox rounded="none" /> | ||
<Checkbox rounded="sm" /> | ||
<Checkbox rounded="lg" variant="primary" /> | ||
|
||
```jsx | ||
import {Checkbox} from '@openlite/ui' | ||
|
||
function App() { | ||
return( | ||
<Checkbox rounded="none" /> | ||
<Checkbox rounded="sm" /> | ||
<Checkbox rounded="lg" variant="primary" /> | ||
) | ||
} | ||
``` | ||
|
||
## API | ||
|
||
### Checkbox Props | ||
|
||
| Props | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| variant | `'default' \| 'primary' \| 'success' \| 'warn' \| 'error'` | The variant of the checkbox. | | ||
| rounded | `'none' \| 'sm' \| 'lg'` | The rounded of the checkbox. | |
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