Skip to content

Commit

Permalink
Merge pull request #122 from PrefectHQ/checkbox-model-type
Browse files Browse the repository at this point in the history
Add CheckboxModel type & Release 0.0.6
  • Loading branch information
pleek91 committed May 18, 2022
2 parents 3e072d5 + 66a5bbc commit 3f0a6ba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
{
"name": "@prefecthq/prefect-design",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"repository": {
"type": "git",
Expand Down
9 changes: 4 additions & 5 deletions src/components/Checkbox/PCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,25 @@
</script>

<script lang="ts" setup>
import { CheckboxModel } from '@/types/checkbox'
import { State } from '@/types/state'
type ModelValue = boolean | unknown[] | undefined
const props = defineProps<{
modelValue: ModelValue | null,
modelValue: CheckboxModel | null,
label?: string,
state?: State,
disabled?: boolean,
}>()
const emits = defineEmits<{
(event: 'update:modelValue', value: ModelValue): void,
(event: 'update:modelValue', value: CheckboxModel): void,
}>()
const value = computed({
get() {
return props.modelValue ?? undefined
},
set(value: ModelValue) {
set(value: CheckboxModel) {
emits('update:modelValue', value)
},
})
Expand Down
1 change: 1 addition & 0 deletions src/types/checkbox.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type CheckboxModel = boolean | unknown[] | undefined
6 changes: 6 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export * from './checkbox'
export * from './icon'
export * from './keyEvent'
export * from './position'
export * from './selectOption'
export * from './size'
export * from './state'
export * from './tables'
export * from './tabs'
export * from './units'

0 comments on commit 3f0a6ba

Please sign in to comment.