Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(docs): maz-switch page #228

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" />