forked from Yadro/time-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircleButton.tsx
More file actions
37 lines (33 loc) · 803 Bytes
/
Copy pathCircleButton.tsx
File metadata and controls
37 lines (33 loc) · 803 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
import React, { SyntheticEvent } from 'react';
import { observer } from 'mobx-react';
import { createUseStyles } from 'react-jss';
import clsx from 'clsx';
interface CircleButtonProps {
className?: string;
onClick: (e: SyntheticEvent) => void;
children: React.ReactNode;
}
export default observer(function CircleButton({
className,
children,
onClick,
}: CircleButtonProps) {
const classes = useStyles();
return (
<span className={clsx(classes.circleButton, className)} onClick={onClick}>
{children}
</span>
);
});
const useStyles = createUseStyles({
circleButton: {
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
height: 28,
width: 28,
borderRadius: 14,
cursor: 'pointer',
backgroundColor: 'black',
},
});