Skip to content

Commit

Permalink
feat: add checkbox sizes (xs, sm, md, lg)
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Jul 18, 2021
1 parent 95c1f8c commit 1502e46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/docs/pages/components/form/checkbox.vue
Expand Up @@ -9,6 +9,10 @@
{ class: 'checkbox-primary', desc: 'Adds `primary` to checkbox' },
{ class: 'checkbox-secondary', desc: 'Adds `secondary` to checkbox' },
{ class: 'checkbox-accent', desc: 'Adds `accent` to checkbox' },
{ class: 'checkbox-lg', desc: 'Large checkbox' },
{ class: 'checkbox-md', desc: 'Medium checkbox (default)' },
{ class: 'checkbox-sm', desc: 'Small checkbox' },
{ class: 'checkbox-xs', desc: 'Extra small checkbox' },
]
}"/>
<Wrapper title="checkbox" classes="flex flex-col space-y-2 max-w-xs">
Expand Down Expand Up @@ -54,6 +58,12 @@
</FormControl>
</div>
</Wrapper>
<Wrapper title="checkbox sizes" classes="flex flex-col space-y-2 max-w-xs">
<Checkbox classes="checkbox-xs" />
<Checkbox classes="checkbox-sm" />
<Checkbox classes="checkbox-md" />
<Checkbox classes="checkbox-lg" />
</Wrapper>
<Wrapper title="checkbox disabled" classes="flex flex-col space-y-2 max-w-xs">
<div class="p-6 card bordered">
<FormControl>
Expand Down
14 changes: 14 additions & 0 deletions src/utilities/unstyled/checkbox.css
@@ -0,0 +1,14 @@
.checkbox{
&-xs {
@apply w-4 h-4;
}
&-sm {
@apply w-5 h-5;
}
&-md {
@apply w-6 h-6;
}
&-lg {
@apply w-8 h-8;
}
}

0 comments on commit 1502e46

Please sign in to comment.