fix(Button): loading on trailing

This commit is contained in:
Benjamin Canac
2024-03-12 14:58:17 +01:00
parent 4446531d04
commit c8bdb51f68
3 changed files with 19 additions and 6 deletions

View File

@@ -56,11 +56,6 @@ export default (config: { colors: string[] }) => ({
label: 'truncate'
}
},
loading: {
true: {
leadingIcon: 'animate-spin'
}
},
block: {
true: {
base: 'w-full',
@@ -75,6 +70,9 @@ export default (config: { colors: string[] }) => ({
},
trailing: {
true: ''
},
loading: {
true: ''
}
},
compoundVariants: [...config.colors.map((color: string) => ({
@@ -149,9 +147,16 @@ export default (config: { colors: string[] }) => ({
size: 'xl',
square: true,
class: 'p-2.5'
}, {
loading: true,
leading: true,
class: {
leadingIcon: 'animate-spin'
}
}, {
loading: true,
leading: false,
trailing: true,
class: {
trailingIcon: 'animate-spin'
}