Skip to content

Commit 3fbbbd9

Browse files
authored
fix: useless spacing classname on banner and button (#5488)
1 parent cc62653 commit 3fbbbd9

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.changeset/breezy-hounds-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
Fix className useless spacing on Banner and Button

packages/ui/src/components/Banner/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const Banner = ({
7575

7676
return (
7777
<Stack
78-
className={`${className ?? ''} ${banner({ size, variant })}`}
78+
className={`${className ? `${className} ` : ''}${banner({ size, variant })}`}
7979
data-testid={dataTestId}
8080
direction="row"
8181
gap={2}

packages/ui/src/components/Button/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`Button > render as an anchor with href prop 1`] = `
77
>
88
<a
99
aria-disabled="false"
10-
class=" styles__e1wcoe0 styles_size_large__e1wcoe1 styles_fullWidth_false__e1wcoe6 styles_disabled_false__e1wcoek styles_variant_filled__e1wcoeg styles_sentiment_primary__e1wcoe7 styles_undefined_compound_0__e1wcoel"
10+
class="styles__e1wcoe0 styles_size_large__e1wcoe1 styles_fullWidth_false__e1wcoe6 styles_disabled_false__e1wcoek styles_variant_filled__e1wcoeg styles_sentiment_primary__e1wcoe7 styles_undefined_compound_0__e1wcoel"
1111
href="http://scaleway.com"
1212
type="button"
1313
>

packages/ui/src/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const Button = forwardRef<Element, FinalProps>(
140140
aria-pressed={ariaPressed}
141141
aria-roledescription={ariaRoledescription}
142142
autoFocus={autoFocus}
143-
className={`${className ?? ''} ${button({ disabled, fullWidth, sentiment, size, variant })}`}
143+
className={`${className ? `${className} ` : ''}${button({ disabled, fullWidth, sentiment, size, variant })}`}
144144
data-testid={dataTestId}
145145
download={download}
146146
href={href}

0 commit comments

Comments
 (0)