-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a8dcbd
commit f21a9b3
Showing
4 changed files
with
77 additions
and
2 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
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,62 @@ | ||
--- | ||
description: MazSwitch is a stand-alone component replaces the standard html input checkbox. Color option available. | ||
--- | ||
|
||
# MazSwitch | ||
|
||
> Before you have to import the global css files in your project, follow instructions in [Getting Started](/maz-ui-3/guide/getting-started.html) | ||
<MazSwitch | ||
v-for="color in colors" | ||
v-model="switchValue" | ||
:color="color" | ||
:name="color" | ||
:key="color" | ||
style="margin-bottom: 12px;" | ||
/> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
const switchValue = ref(false) | ||
|
||
const colors = [ | ||
'primary', | ||
'secondary', | ||
'info', | ||
'success', | ||
'warning', | ||
'danger', | ||
] | ||
</script> | ||
|
||
```vue | ||
<template> | ||
<MazSwitch | ||
v-for="color in colors" | ||
v-model="switchValue" | ||
:color="color" | ||
:name="color" | ||
:key="color" | ||
/> | ||
</template> | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import MazSwitch from 'maz-ui/components/MazSwitch' | ||
const switchValue = ref(false) | ||
const colors = [ | ||
'primary', | ||
'secondary', | ||
'info', | ||
'success', | ||
'warning', | ||
'danger', | ||
] | ||
</script> | ||
``` | ||
|
||
## Props & Events emitted | ||
|
||
<ComponentPropDoc component="MazSwitch" /> |