Skip to content

Commit

Permalink
docs(docs): maz-switch page (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisMazel committed Mar 17, 2022
1 parent 4a8dcbd commit f21a9b3
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/docs/docs/.vuepress/configs/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const components = {
'/components/maz-phone-number-input.md',
'/components/maz-select.md',
'/components/maz-slider.md',
'/components/maz-switch.md',
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions packages/docs/docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ code {
font-size: .85em;
}

.token.tag {
color: var(--maz-color-danger);
}

.token.attr-name {
color:#4EC9B0;
}

.token.attr-value {
color: var(--maz-bg-color-light-light);
}

.flex {
display: flex;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/components/maz-checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ description: MazCheckbox is a stand-alone component replaces the standard html i
</template>
<script lang="ts" setup>
import { MazCheckbox } from 'vue'
import { ref } from 'vue'
import MazCheckbox from 'maz-ui/components/MazCheckbox'
const inputValue = ref(false)
const colors = [
Expand Down
62 changes: 62 additions & 0 deletions packages/docs/docs/components/maz-switch.md
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" />

0 comments on commit f21a9b3

Please sign in to comment.