2016-08-31 23:22:36 +00:00
|
|
|
<template>
|
2016-11-24 23:44:49 +00:00
|
|
|
<page-content page-title="Components - Checkbox">
|
|
|
|
|
<docs-component>
|
|
|
|
|
<div slot="description">
|
|
|
|
|
<p>Checkboxes allow the user to select multiple options from a set.</p>
|
|
|
|
|
<p>The following classes can be applied to change the color palette:</p>
|
|
|
|
|
<ul class="md-body-2">
|
|
|
|
|
<li><code>md-primary</code></li>
|
|
|
|
|
<li><code>md-warn</code></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div slot="api">
|
|
|
|
|
<api-table name="md-checkbox">
|
|
|
|
|
<md-table slot="properties">
|
|
|
|
|
<md-table-header>
|
|
|
|
|
<md-table-row>
|
|
|
|
|
<md-table-head>Name</md-table-head>
|
|
|
|
|
<md-table-head>Type</md-table-head>
|
|
|
|
|
<md-table-head>Description</md-table-head>
|
|
|
|
|
</md-table-row>
|
|
|
|
|
</md-table-header>
|
|
|
|
|
|
|
|
|
|
<md-table-body>
|
|
|
|
|
<md-table-row>
|
|
|
|
|
<md-table-cell>name</md-table-cell>
|
|
|
|
|
<md-table-cell><code>String</code></md-table-cell>
|
|
|
|
|
<md-table-cell>Set the checkbox name</md-table-cell>
|
|
|
|
|
</md-table-row>
|
|
|
|
|
|
|
|
|
|
<md-table-row>
|
|
|
|
|
<md-table-cell>id</md-table-cell>
|
|
|
|
|
<md-table-cell><code>String</code></md-table-cell>
|
|
|
|
|
<md-table-cell>Set the checkbox id</md-table-cell>
|
|
|
|
|
</md-table-row>
|
|
|
|
|
|
|
|
|
|
<md-table-row>
|
|
|
|
|
<md-table-cell>disabled</md-table-cell>
|
|
|
|
|
<md-table-cell><code>String</code></md-table-cell>
|
|
|
|
|
<md-table-cell>Disable the checkbox and prevent his actions</md-table-cell>
|
|
|
|
|
</md-table-row>
|
|
|
|
|
</md-table-body>
|
|
|
|
|
</md-table>
|
|
|
|
|
</api-table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div slot="example">
|
|
|
|
|
<example-box card-title="Default">
|
|
|
|
|
<div slot="demo">
|
|
|
|
|
<md-checkbox id="my-test1" name="my-test1" v-model="checkbox">Regular Checkbox</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test2" name="my-test2" v-model="checkbox" class="md-primary">Primary Color</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test3" name="my-test3" v-model="checkbox" class="md-warn">Warn Color</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test4" name="my-test4" v-model="checkbox" disabled>Disabled</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div slot="code">
|
|
|
|
|
<code-block lang="xml">
|
|
|
|
|
<md-checkbox id="my-test1" name="my-test1" v-model="checkbox">Regular Checkbox</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test2" name="my-test2" v-model="checkbox" class="md-primary">Primary Color</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test3" name="my-test3" v-model="checkbox" class="md-warn">Warn Color</md-checkbox>
|
|
|
|
|
<md-checkbox id="my-test4" name="my-test4" v-model="checkbox" disabled>Disabled</md-checkbox>
|
|
|
|
|
</code-block>
|
|
|
|
|
</div>
|
|
|
|
|
</example-box>
|
|
|
|
|
|
|
|
|
|
<example-box card-title="Themes">
|
|
|
|
|
<div slot="demo">
|
|
|
|
|
<div class="themed" v-md-theme="'orange'">
|
|
|
|
|
<md-checkbox id="my-test5" name="my-test5" v-model="checkbox2" class="md-primary">Primary Orange</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="themed" v-md-theme="'green'">
|
|
|
|
|
<md-checkbox id="my-test6" name="my-test6" v-model="checkbox2" class="md-primary">Primary Green</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="themed" v-md-theme="'light-blue'">
|
|
|
|
|
<md-checkbox id="my-test7" name="my-test7" v-model="checkbox2" class="md-primary">Primary Light Blue</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="themed" v-md-theme="'indigo'">
|
|
|
|
|
<md-checkbox id="my-test8" name="my-test8" v-model="checkbox2" class="md-primary">Primary Indigo</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="themed" v-md-theme="'brown'">
|
|
|
|
|
<md-checkbox id="my-test9" name="my-test9" v-model="checkbox2" class="md-primary" disabled>Primary Brown Disabled</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div slot="code">
|
|
|
|
|
<code-block lang="xml">
|
|
|
|
|
<div v-md-theme="'orange'">
|
|
|
|
|
<md-checkbox id="my-test5" name="my-test5" v-model="checkbox2" class="md-primary">Primary Orange</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-md-theme="'green'">
|
|
|
|
|
<md-checkbox id="my-test6" name="my-test6" v-model="checkbox2" class="md-primary">Primary Green</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-md-theme="'light-blue'">
|
|
|
|
|
<md-checkbox id="my-test7" name="my-test7" v-model="checkbox2" class="md-primary">Primary Light Blue</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-md-theme="'indigo'">
|
|
|
|
|
<md-checkbox id="my-test8" name="my-test8" v-model="checkbox2" class="md-primary">Primary Indigo</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-md-theme="'brown'">
|
|
|
|
|
<md-checkbox id="my-test9" name="my-test9" v-model="checkbox2" class="md-primary" disabled>Primary Brown Disabled</md-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
</code-block>
|
|
|
|
|
</div>
|
|
|
|
|
</example-box>
|
|
|
|
|
</div>
|
|
|
|
|
</docs-component>
|
|
|
|
|
</page-content>
|
2016-08-31 23:22:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2016-09-19 03:45:48 +00:00
|
|
|
.themed {
|
|
|
|
|
display: inline-block;
|
2016-08-31 23:22:36 +00:00
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
2016-09-06 01:03:25 +00:00
|
|
|
data() {
|
|
|
|
|
return {
|
2016-09-08 05:39:13 +00:00
|
|
|
checkbox: true,
|
|
|
|
|
checkbox2: false
|
2016-09-06 01:03:25 +00:00
|
|
|
};
|
2016-08-31 23:22:36 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|