Skip to content

Commit 1676212

Browse files
committed
fix: duplicate style attributes
1 parent d7f4ac5 commit 1676212

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/anu-vue/src/components/alert/AAlert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const AAlert = defineComponent({
7373
}
7474

7575
// TODO: Omit writing `props.modelValue ??` multiple times
76-
return () => <div style={{ '--a-spacing': spacing.value / 100 }} class={['a-alert items-start w-full', props.modelValue ?? isAlertVisible.value ? 'flex' : 'hidden', ...classes.value]} style={[...styles.value]}>
76+
return () => <div style={[...styles.value, { '--a-spacing': spacing.value / 100 }]} class={['a-alert items-start w-full', props.modelValue ?? isAlertVisible.value ? 'flex' : 'hidden', ...classes.value]}>
7777
{/* ℹ️ We need div as wrapper with span having `vertical-align: text-top` to center the icon with the text */}
7878
{props.icon ? <div><span class={props.icon}></span></div> : null}
7979
<div class="flex-grow">{slots.default?.()}</div>

packages/anu-vue/src/components/avatar/AAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const AAvatar = defineComponent({
3535
return props.content
3636
})
3737

38-
return () => <div style={{ '--a-spacing': spacing.value / 100 }} class={['a-avatar overflow-hidden inline-flex items-center justify-center', ...classes.value]} style={[...styles.value]}>
38+
return () => <div style={[...styles.value, { '--a-spacing': spacing.value / 100 }]} class={['a-avatar overflow-hidden inline-flex items-center justify-center', ...classes.value]}>
3939
{
4040
slots.default
4141
? slots.default()

packages/anu-vue/src/components/badge/ABadge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const ABadge = defineComponent({
9696

9797
return () => <div class={['a-badge-wrapper relative']}>
9898
{slots.default?.()}
99-
<div {...attrs} style={{ '--a-spacing': spacing.value / 100 }} class={[`a-badge bg-${props.color} absolute`, { 'a-badge-dot': props.dot }, { 'a-badge-bordered': props.bordered }]} style={positionStyles.value}>
99+
<div {...attrs} style={[positionStyles.value, { '--a-spacing': spacing.value / 100 }]} class={[`a-badge bg-${props.color} absolute`, { 'a-badge-dot': props.dot }, { 'a-badge-bordered': props.bordered }]}>
100100
{badgeSlotContent.value}
101101
</div>
102102
</div>

packages/anu-vue/src/components/btn/ABtn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const ABtn = defineComponent({
6767
)
6868

6969
// FIX: ABtn gets full width if placed inside flex container
70-
return () => <button style={{ '--a-spacing': spacing.value / 100 }} class={[props.iconOnly ? 'a-btn-icon-only' : 'a-btn', 'whitespace-nowrap inline-flex justify-center items-center', { 'opacity-50 pointer-events-none': props.disabled }, ...classes.value]} style={[...styles.value]}>
70+
return () => <button style={[...styles.value, { '--a-spacing': spacing.value / 100 }]} class={[props.iconOnly ? 'a-btn-icon-only' : 'a-btn', 'whitespace-nowrap inline-flex justify-center items-center', { 'opacity-50 pointer-events-none': props.disabled }, ...classes.value]}>
7171
{props.icon ? <i class={props.icon}></i> : null}{slots.default?.()}{props.appendIcon ? <i class={props.appendIcon}></i> : null}
7272
</button>
7373
},

packages/anu-vue/src/components/card/ACard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const ACard = defineComponent({
4848
}
4949
}
5050

51-
return () => <div style={{ '--a-spacing': spacing.value / 100 }} class={['a-card overflow-hidden uno-layer-base-bg-[hsl(var(--a-layer))]', ...classes.value]} style={[...styles.value]}>
51+
return () => <div style={[...styles.value, { '--a-spacing': spacing.value / 100 }]} class={['a-card overflow-hidden uno-layer-base-bg-[hsl(var(--a-layer))]', ...classes.value]}>
5252
{/* 👉 Image */}
5353
{props.img ? <img src={props.img} alt="card-img"></img> : null}
5454

0 commit comments

Comments
 (0)