Skip to content

Commit 245303c

Browse files
fix(fuselage): ToastBar style (#725)
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
1 parent 203673c commit 245303c

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

packages/fuselage/src/components/ToastBar/ToastBar.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type ToastBarProps = {
1111
variant?: 'info' | 'success' | 'error';
1212
className?: string;
1313
children?: ReactNode;
14-
size?: string;
1514
time?: number;
1615
id?: string;
1716
onClose?: (id: string) => void;
@@ -21,7 +20,6 @@ export function ToastBar({
2120
children,
2221
className = '',
2322
variant = 'info',
24-
size,
2523
time = 5,
2624
id,
2725
onClose,
@@ -65,11 +63,7 @@ export function ToastBar({
6563

6664
return (
6765
<Box className={['rcx-toastbar-wrapper', toastBarAnimation]}>
68-
<div
69-
className={`rcx-toastbar rcx-toastbar--${variant} ${
70-
size === 'large' ? 'rcx-toastbar--large' : ''
71-
} ${className}`}
72-
>
66+
<div className={`rcx-toastbar rcx-toastbar--${variant} ${className}`}>
7367
<div className='rcx-toastbar-inner'>
7468
<Icon size='x20' name={iconName} />
7569
<div className='rcx-toastbar-content'>{children}</div>

packages/fuselage/src/components/ToastBar/styles.scss

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,15 @@
33
@use '../../styles/typography.scss';
44

55
.rcx-toastbar {
6+
position: relative;
7+
68
min-width: lengths.size(232);
79
max-width: lengths.size(416);
810

911
border-radius: lengths.border-radius(4);
1012

1113
@include typography.use-font-scale(p2);
1214

13-
&--large {
14-
max-width: lengths.size(360);
15-
@include on-breakpoint(md) {
16-
max-width: lengths.size(580);
17-
}
18-
}
19-
2015
&--info {
2116
background-color: colors.neutral(100);
2217
}

0 commit comments

Comments
 (0)