mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 03:10:42 +01:00
chore(Select): add appearance prop
This commit is contained in:
@@ -97,6 +97,13 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
appearance: {
|
||||||
|
type: String,
|
||||||
|
default: 'default',
|
||||||
|
validator (value: string) {
|
||||||
|
return Object.keys($ui.select.appearance).includes(value)
|
||||||
|
}
|
||||||
|
},
|
||||||
textAttribute: {
|
textAttribute: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text'
|
default: 'text'
|
||||||
@@ -173,7 +180,7 @@ const selectClass = computed(() => {
|
|||||||
props.baseClass,
|
props.baseClass,
|
||||||
$ui.select.size[props.size],
|
$ui.select.size[props.size],
|
||||||
$ui.select.spacing[props.size],
|
$ui.select.spacing[props.size],
|
||||||
$ui.select.appearance.default,
|
$ui.select.appearance[props.appearance],
|
||||||
!!props.icon && $ui.select.leading.spacing[props.size],
|
!!props.icon && $ui.select.leading.spacing[props.size],
|
||||||
$ui.select.trailing.spacing[props.size],
|
$ui.select.trailing.spacing[props.size],
|
||||||
props.customClass
|
props.customClass
|
||||||
|
|||||||
@@ -101,6 +101,13 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
appearance: {
|
||||||
|
type: String,
|
||||||
|
default: 'default',
|
||||||
|
validator (value: string) {
|
||||||
|
return Object.keys($ui.selectCustom.appearance).includes(value)
|
||||||
|
}
|
||||||
|
},
|
||||||
listBaseClass: {
|
listBaseClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => $ui.selectCustom.list.base
|
default: () => $ui.selectCustom.list.base
|
||||||
@@ -150,7 +157,7 @@ const selectCustomClass = computed(() => {
|
|||||||
props.baseClass,
|
props.baseClass,
|
||||||
$ui.selectCustom.size[props.size],
|
$ui.selectCustom.size[props.size],
|
||||||
$ui.selectCustom.spacing[props.size],
|
$ui.selectCustom.spacing[props.size],
|
||||||
$ui.selectCustom.appearance.default,
|
$ui.selectCustom.appearance[props.appearance],
|
||||||
$ui.selectCustom.trailing.spacing[props.size],
|
$ui.selectCustom.trailing.spacing[props.size],
|
||||||
props.customClass
|
props.customClass
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user