Skip to content
7 changes: 3 additions & 4 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@

/* Override Storybook's problematic & selector styles */
/* Reset only the specific properties that Storybook injects */
#storybook-root li+li,
#storybook-docs li+li {
margin: inherit;
padding: inherit;
li+li {
margin: 0;
padding: revert-layer;
}
</style>
5 changes: 2 additions & 3 deletions src/components/button/IconButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getButtonTypeClasses,
getIconButtonSizeClasses
} from '@/types/buttonTypes'
import { cn } from '@/utils/tailwindUtil'

interface IconButtonProps extends BaseButtonProps {
onClick: (event: Event) => void
Expand All @@ -46,8 +47,6 @@ const buttonStyle = computed(() => {
? getBorderButtonTypeClasses(type)
: getButtonTypeClasses(type)

return [baseClasses, sizeClasses, typeClasses, className]
.filter(Boolean)
.join(' ')
return cn(baseClasses, sizeClasses, typeClasses, className)
})
</script>
16 changes: 13 additions & 3 deletions src/components/button/IconGroup.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<template>
<div
class="flex justify-center items-center shrink-0 outline-hidden border-none p-0 bg-white text-neutral-950 dark-theme:bg-zinc-700 dark-theme:text-white rounded-lg cursor-pointer"
>
<div :class="iconGroupClasses">
<slot></slot>
</div>
</template>

<script setup lang="ts">
import { cn } from '@/utils/tailwindUtil'

const iconGroupClasses = cn(
'flex justify-center items-center shrink-0',
'outline-hidden border-none p-0 rounded-lg',
'bg-white dark-theme:bg-zinc-700',
'text-neutral-950 dark-theme:text-white',
'cursor-pointer'
)
</script>
5 changes: 2 additions & 3 deletions src/components/button/IconTextButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
getButtonSizeClasses,
getButtonTypeClasses
} from '@/types/buttonTypes'
import { cn } from '@/utils/tailwindUtil'

defineOptions({
inheritAttrs: false
Expand Down Expand Up @@ -52,8 +53,6 @@ const buttonStyle = computed(() => {
? getBorderButtonTypeClasses(type)
: getButtonTypeClasses(type)

return [baseClasses, sizeClasses, typeClasses, className]
.filter(Boolean)
.join(' ')
return cn(baseClasses, sizeClasses, typeClasses, className)
})
</script>
17 changes: 11 additions & 6 deletions src/components/button/MoreButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
unstyled
:pt="pt"
>
<div class="flex flex-col gap-1 p-2 min-w-40">
<div class="flex flex-col gap-2 p-2 min-w-40">
<slot :close="hide" />
</div>
</Popover>
Expand All @@ -25,6 +25,8 @@
import Popover from 'primevue/popover'
import { computed, ref } from 'vue'

import { cn } from '@/utils/tailwindUtil'

import IconButton from './IconButton.vue'

const popover = ref<InstanceType<typeof Popover>>()
Expand All @@ -39,13 +41,16 @@ const hide = () => {

const pt = computed(() => ({
root: {
class: 'absolute z-50'
class: cn('absolute z-50')
},
content: {
class: [
'mt-2 bg-white dark-theme:bg-zinc-800 text-neutral dark-theme:text-white rounded-lg',
'shadow-lg border border-zinc-200 dark-theme:border-zinc-700'
]
class: cn(
'mt-2 rounded-lg',
'bg-white dark-theme:bg-zinc-800',
'text-neutral dark-theme:text-white',
'shadow-lg',
'border border-zinc-200 dark-theme:border-zinc-700'
)
}
}))
</script>
5 changes: 2 additions & 3 deletions src/components/button/TextButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getButtonSizeClasses,
getButtonTypeClasses
} from '@/types/buttonTypes'
import { cn } from '@/utils/tailwindUtil'

interface TextButtonProps extends BaseButtonProps {
label: string
Expand Down Expand Up @@ -48,8 +49,6 @@ const buttonStyle = computed(() => {
? getBorderButtonTypeClasses(type)
: getButtonTypeClasses(type)

return [baseClasses, sizeClasses, typeClasses, className]
.filter(Boolean)
.join(' ')
return cn(baseClasses, sizeClasses, typeClasses, className)
})
</script>
Loading
Loading