Skip to content

Commit

Permalink
fix(fuselage): ToastBar style (#725)
Browse files Browse the repository at this point in the history
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
  • Loading branch information
dougfabris and gabriellsh authored May 20, 2022
1 parent 203673c commit 245303c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
8 changes: 1 addition & 7 deletions packages/fuselage/src/components/ToastBar/ToastBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export type ToastBarProps = {
variant?: 'info' | 'success' | 'error';
className?: string;
children?: ReactNode;
size?: string;
time?: number;
id?: string;
onClose?: (id: string) => void;
Expand All @@ -21,7 +20,6 @@ export function ToastBar({
children,
className = '',
variant = 'info',
size,
time = 5,
id,
onClose,
Expand Down Expand Up @@ -65,11 +63,7 @@ export function ToastBar({

return (
<Box className={['rcx-toastbar-wrapper', toastBarAnimation]}>
<div
className={`rcx-toastbar rcx-toastbar--${variant} ${
size === 'large' ? 'rcx-toastbar--large' : ''
} ${className}`}
>
<div className={`rcx-toastbar rcx-toastbar--${variant} ${className}`}>
<div className='rcx-toastbar-inner'>
<Icon size='x20' name={iconName} />
<div className='rcx-toastbar-content'>{children}</div>
Expand Down
9 changes: 2 additions & 7 deletions packages/fuselage/src/components/ToastBar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
@use '../../styles/typography.scss';

.rcx-toastbar {
position: relative;

min-width: lengths.size(232);
max-width: lengths.size(416);

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

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

&--large {
max-width: lengths.size(360);
@include on-breakpoint(md) {
max-width: lengths.size(580);
}
}

&--info {
background-color: colors.neutral(100);
}
Expand Down

0 comments on commit 245303c

Please sign in to comment.