mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
chore(Divider): clean code
This commit is contained in:
@@ -74,27 +74,25 @@ export default defineComponent({
|
||||
setup (props) {
|
||||
const { ui, attrs } = useUI('divider', toRef(props, 'ui'), config)
|
||||
|
||||
const isHorizontal = computed(() => props.orientation === 'horizontal' )
|
||||
|
||||
const wrapperClass = computed(() => {
|
||||
return twMerge(twJoin(
|
||||
ui.value.wrapper.base,
|
||||
isHorizontal.value ? ui.value.wrapper.horizontal : ui.value.wrapper.vertical
|
||||
ui.value.wrapper[props.orientation]
|
||||
), props.class)
|
||||
})
|
||||
|
||||
const containerClass = computed(() => {
|
||||
return twJoin(
|
||||
ui.value.container.base,
|
||||
isHorizontal.value ? ui.value.container.horizontal : ui.value.container.vertical
|
||||
ui.value.container[props.orientation]
|
||||
)
|
||||
})
|
||||
|
||||
const borderClass = computed(() => {
|
||||
return twJoin(
|
||||
ui.value.border.base,
|
||||
isHorizontal.value ? ui.value.border.horizontal : ui.value.border.vertical,
|
||||
isHorizontal.value ? ui.value.border.size.horizontal : ui.value.border.size.vertical,
|
||||
ui.value.border[props.orientation],
|
||||
ui.value.border.size[props.orientation],
|
||||
ui.value.border.type[props.type]
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user