summaryrefslogtreecommitdiff
path: root/frontend/src/components/NotificationBadge.tsx
blob: 3c5d821542a78683554e219d508f12c825b612da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { CSSProperties, FunctionComponent } from 'react';

interface NotificationBadgeProps {
  show?: boolean;
  style?: CSSProperties;
}

const NotificationBadge: FunctionComponent<NotificationBadgeProps> = ({ show, style }) => {
  return show ? (
    <div
      style={{
        position: 'absolute',
        top: '8px',
        right: '8px',
        height: '10px',
        width: '10px',
        background: 'orange',
        borderRadius: '50%',
        ...style,
      }}
    />
  ) : null;
};

export default NotificationBadge;