Skip to content

Commit

Permalink
example: add Checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrison authored and Garrison committed Dec 12, 2023
1 parent 4517e2e commit e37a762
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
47 changes: 47 additions & 0 deletions examples/checkbox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<script setup lang="ts">
import { ref } from 'vue';
import { GuvCheckbox } from '@garrigarrison/vue-ui-kit';
const handleCheck = (): void => {
if (check2.value) {
alert('Hello! Check');
}
};
const check = ref(false);
const check2 = ref();
const check3 = ref(true);
</script>

<template>
<div class="wrapper">
<guv-checkbox v-model="check" title="Check me" minus-icon />

<guv-checkbox v-model="check2" title="Check me Checked" checked />

<guv-checkbox v-model="check2" title="Check me F" @change="handleCheck" />

<guv-checkbox v-model="check" title="Disabled" disabled @change="handleCheck" />

<guv-checkbox v-model="check3" title="Disabled" disabled />

<guv-checkbox v-model="check3" title="Style" :style="{ marginTop: '50px' }" />
</div>
</template>

<style scoped lang="scss">
.wrapper {
display: flex;
flex-direction: column;
gap: 20px;
.img {
width: 15px;
height: 15px;
}
}
.test {
background-color: greenyellow;
}
</style>
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@garrigarrison/vue-ui-kit": "^0.4.0",
"@garrigarrison/vue-ui-kit": "^0.5.0",
"@mapbox/stylelint-processor-arbitrary-tags": "^0.4.0",
"@storybook/addon-actions": "^7.6.4",
"@storybook/addon-essentials": "^7.6.4",
Expand Down

0 comments on commit e37a762

Please sign in to comment.