mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 22:41:42 +01:00
chore: use get in useUI
This commit is contained in:
@@ -94,7 +94,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const { ui, attrs } = useUI('accordion', props.ui, config, { mergeWrapper: true })
|
||||
const { ui, attrs } = useUI('ui.accordion', props.ui, config, { mergeWrapper: true })
|
||||
|
||||
const uiButton = computed<Partial<typeof configButton>>(() => configButton)
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ export default defineComponent({
|
||||
},
|
||||
emits: ['close'],
|
||||
setup (props) {
|
||||
const { ui, attrs, attrsClass } = useUI('alert', props.ui, config)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.alert', props.ui, config)
|
||||
|
||||
const alertClass = computed(() => {
|
||||
const variant = ui.value.color?.[props.color as string]?.[props.variant as string] || ui.value.variant[props.variant]
|
||||
|
||||
@@ -90,7 +90,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const { ui, attrs, attrsClass } = useUI('avatar', props.ui, config)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.avatar', props.ui, config)
|
||||
|
||||
const url = computed(() => {
|
||||
if (typeof props.src === 'boolean') {
|
||||
|
||||
@@ -33,7 +33,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props, { slots }) {
|
||||
const { ui, attrs } = useUI('avatarGroup', props.ui, avatarGroupConfig, { mergeWrapper: true })
|
||||
const { ui, attrs } = useUI('ui.avatarGroup', props.ui, avatarGroupConfig, { mergeWrapper: true })
|
||||
|
||||
const children = computed(() => getSlotsChildren(slots))
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const { ui, attrs, attrsClass } = useUI('badge', props.ui, config)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.badge', props.ui, config)
|
||||
|
||||
const badgeClass = computed(() => {
|
||||
const variant = ui.value.color?.[props.color as string]?.[props.variant as string] || ui.value.variant[props.variant]
|
||||
|
||||
@@ -124,7 +124,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props, { slots }) {
|
||||
const { ui, attrs, attrsClass } = useUI('button', props.ui, config)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.button', props.ui, config)
|
||||
|
||||
const isLeading = computed(() => {
|
||||
return (props.icon && props.leading) || (props.icon && !props.trailing) || (props.loading && !props.trailing) || props.leadingIcon
|
||||
|
||||
@@ -34,7 +34,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props, { slots }) {
|
||||
const { ui, attrs, attrsClass } = useUI('buttonGroup', props.ui, buttonGroupConfig)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.buttonGroup', props.ui, buttonGroupConfig)
|
||||
|
||||
const children = computed(() => getSlotsChildren(slots))
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const { ui, attrs } = useUI('dropdown', props.ui, config, { mergeWrapper: true })
|
||||
const { ui, attrs } = useUI('ui.dropdown', props.ui, config, { mergeWrapper: true })
|
||||
|
||||
const popper = computed<PopperOptions>(() => defu(props.mode === 'hover' ? { offsetDistance: 0 } : {}, props.popper, ui.value.popper as PopperOptions))
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const { ui, attrs, attrsClass } = useUI('kbd', props.ui, config)
|
||||
const { ui, attrs, attrsClass } = useUI('ui.kbd', props.ui, config)
|
||||
|
||||
const kbdClass = computed(() => {
|
||||
return twMerge(twJoin(
|
||||
|
||||
Reference in New Issue
Block a user