Skip to content

Commit

Permalink
Updating Notification to play nicely with the new IconButton styles
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelArestad committed Oct 28, 2021
1 parent 6705489 commit a396d5d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions lib/ui/src/components/notifications/NotificationItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const Notification = styled.div(({ theme }) => ({
padding: 15,
width: 280,
borderRadius: 4,
alignItems: 'center',

background:
theme.base === 'light'
Expand Down Expand Up @@ -98,25 +99,23 @@ const ItemContent: FunctionComponent<Pick<State['notifications'][0], 'icon' | 'c
);

const DismissButtonWrapper = styled(IconButton)(({ theme }) => ({
height: '100%',
display: 'flex',
alignSelf: 'center',
marginTop: 0,
color: theme.base === 'light' ? 'rgba(255,255,255,0.7)' : ' #999999',
}));

const DismissNotificationItem: FunctionComponent<{
onDismiss: () => void;
}> = ({ onDismiss }) => (
<div>
<DismissButtonWrapper
title="Dismiss notification"
onClick={(e: SyntheticEvent) => {
e.preventDefault();
onDismiss();
}}
>
<Icons icon="closeAlt" height={12} width={12} />
</DismissButtonWrapper>
</div>
<DismissButtonWrapper
title="Dismiss notification"
onClick={(e: SyntheticEvent) => {
e.preventDefault();
onDismiss();
}}
>
<Icons icon="closeAlt" height={12} width={12} />
</DismissButtonWrapper>
);

export const NotificationItemSpacer = styled.div({
Expand Down

0 comments on commit a396d5d

Please sign in to comment.