Skip to content

Commit

Permalink
Merge pull request #446 from AppQuality/develop
Browse files Browse the repository at this point in the history
new version for global-alert
  • Loading branch information
iacopolea authored Nov 21, 2024
2 parents a1b3cac + 0fbec8b commit ce304c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stories/notifications/global-alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export interface GlobalAlertProps extends Omit<IGlobalAlertProps, 'type'> {
dismissable?: boolean;
onClose?: () => void;
cta?: {
label: string;
label: ReactNode;
onClick?: () => void;
buttonProps?: ButtonArgs;
};
}

Expand Down Expand Up @@ -141,7 +142,7 @@ export const GlobalAlert = forwardRef<HTMLDivElement, GlobalAlertProps>(({ type,
{title && <StyledGlobalAlert.Title>{title}</StyledGlobalAlert.Title>}
{message}
</StyledGlobalAlert.Content>
{cta && <CustomButton onClick={cta.onClick} className="global-alert-cta" isAccent={type==='accent'}>{cta.label}</CustomButton>}
{cta && <CustomButton onClick={cta.onClick} className="global-alert-cta" isAccent={type==='accent'} {...cta.buttonProps}>{cta.label}</CustomButton>}
{dismissable && <StyledGlobalAlert.Close aria-label="Close Global Alert" onClick={onClose} />}
</StyledGlobalAlert>
));
Expand Down

0 comments on commit ce304c1

Please sign in to comment.