2018-06-23 22:27:16 +00:00
|
|
|
// @flow
|
2020-06-20 20:59:15 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import styled from "styled-components";
|
|
|
|
import { bounceIn } from "shared/styles/animations";
|
2018-06-23 22:27:16 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
count: number,
|
|
|
|
};
|
|
|
|
|
|
|
|
const Bubble = ({ count }: Props) => {
|
2019-08-06 06:17:41 +00:00
|
|
|
return <Count>{count}</Count>;
|
2018-06-23 22:27:16 +00:00
|
|
|
};
|
|
|
|
|
2019-01-07 00:25:05 +00:00
|
|
|
const Count = styled.div`
|
2019-08-25 00:43:23 +00:00
|
|
|
animation: ${bounceIn} 600ms;
|
|
|
|
transform-origin: center center;
|
2020-08-09 01:53:11 +00:00
|
|
|
color: ${(props) => props.theme.white};
|
|
|
|
background: ${(props) => props.theme.slateDark};
|
2018-06-23 22:27:16 +00:00
|
|
|
display: inline-block;
|
2020-06-20 20:59:15 +00:00
|
|
|
font-feature-settings: "tnum";
|
2019-01-07 00:25:05 +00:00
|
|
|
font-weight: 600;
|
|
|
|
font-size: 9px;
|
2019-08-25 00:43:23 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: baseline;
|
2019-01-07 00:25:05 +00:00
|
|
|
min-width: 16px;
|
|
|
|
min-height: 16px;
|
2019-09-23 00:09:11 +00:00
|
|
|
line-height: 16px;
|
|
|
|
border-radius: 8px;
|
2019-01-07 00:25:05 +00:00
|
|
|
text-align: center;
|
2019-01-07 00:12:07 +00:00
|
|
|
padding: 0 4px;
|
2019-08-06 06:17:41 +00:00
|
|
|
margin-left: 8px;
|
2019-08-25 00:43:23 +00:00
|
|
|
user-select: none;
|
2018-06-23 22:27:16 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export default Bubble;
|