Skip to content

Commit f5a2b57

Browse files
committed
feat: Allow to specify the size of the KColorPicker (close #1139)
1 parent 6b87cf9 commit f5a2b57

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

core/client/components/input/KColorPicker.vue

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<template>
22
<div>
3-
<q-btn id="style-point-color" round style="max-width: 16px" :style="{ 'background-color': color }"/>
3+
<q-btn
4+
id="color-picker"
5+
:size="size"
6+
round
7+
:style="{ 'background-color': color }"
8+
/>
49
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
510
<q-color
611
v-model="color"
@@ -35,10 +40,14 @@ const props = defineProps({
3540
},
3641
defaultView: {
3742
type: String,
38-
default: 'spectrum',
43+
default: 'palette',
3944
validator: (value) => {
40-
return ['spectrum', 'tune', 'palette', 'swatches'].includes(value)
45+
return ['spectrum', 'tune'].includes(value)
4146
}
47+
},
48+
size: {
49+
type: String,
50+
default: 'sm'
4251
}
4352
})
4453

0 commit comments

Comments
 (0)