Skip to content

Commit

Permalink
Merge pull request #1312 from Bynder/GC-3155-notification-icon-and-blip
Browse files Browse the repository at this point in the history
GC-3155 Notification Blip
  • Loading branch information
lewishankinson authored Oct 20, 2023
2 parents a5a5827 + 73ed77e commit 6d17bd6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Notification/blip/NotificationBlip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import cx from 'classnames';

interface Props {
className?: string;
}

export default function NotificationBlip({ className }: Props) {
const classes = cx('notification-blip', className);
return <div className={classes}></div>;
}
9 changes: 9 additions & 0 deletions lib/Notification/blip/styles/NotificationBlip.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.notification-blip {
@apply absolute h-full w-full;
}

.notification-blip::after {
@apply rounded-full absolute block h-1.5 w-1.5 bg-red-40 right-[13%] top-[13%];

content: '';
}
1 change: 1 addition & 0 deletions stories/components/Icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const allIcons = (additionalProps?: any) => (
<Icon name="caretRight" {...additionalProps} />
<Icon name="arrowReturn" {...additionalProps} />
<Icon name="arrowRightAngle" {...additionalProps} />
<Icon name="bell" {...additionalProps} />
</div>
);

Expand Down
21 changes: 21 additions & 0 deletions stories/components/NotificationBlip.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import { Button, ButtonIcon } from "../../lib";
import { Icon } from "../../lib";
import NotificationBlipComponent from "../../lib/Notification/blip/NotificationBlip";
import StoryItem from "../styleguide/StoryItem";

export default {
title: 'GUI/Notification Blip',
component: NotificationBlipComponent,
};

export const NotificationBlip = (args: any) => <>
<StoryItem
title="Notification blip"
description="A visual indicator to inform the user they have notifications"
>
<ButtonIcon name={'bell'}>
<NotificationBlipComponent />
</ButtonIcon>
</StoryItem>
</>;
1 change: 1 addition & 0 deletions styles/components/_ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import "../../lib/Avatar/AvatarGroup/styles";
@import "../../lib/CheckToggle/styles";
@import "../../lib/Notification/styles";
@import "../../lib/Notification/blip/styles/NotificationBlip";
@import "../../lib/Dropdown/styles";
@import "../../lib/DropdownMenu/styles";
@import "../../lib/Progress/styles";
Expand Down

0 comments on commit 6d17bd6

Please sign in to comment.