- Running `yarn build` in a `packages/*/` directory will trigger build of all dependencies too, and cache them if possible. - Fix for `yarn dev` breaking for `rrweb` package whenever changing files in `rrweb` package - Update typescript, turbo, vite and vite-plugin-dts - Require `workspaces-to-typescript-project-references` from `prepublish`
34 lines
640 B
TypeScript
34 lines
640 B
TypeScript
import { Button, type ButtonProps } from '@chakra-ui/react';
|
|
|
|
interface CircleButtonProps extends ButtonProps {
|
|
diameter: number;
|
|
onClick?: () => void;
|
|
children?: React.ReactNode;
|
|
title?: string;
|
|
}
|
|
|
|
export function CircleButton({
|
|
diameter,
|
|
onClick,
|
|
children,
|
|
title,
|
|
...rest
|
|
}: CircleButtonProps) {
|
|
return (
|
|
<Button
|
|
w={`${diameter}rem`}
|
|
h={`${diameter}rem`}
|
|
padding={`${diameter / 2}rem`}
|
|
borderRadius={9999}
|
|
textAlign="center"
|
|
bgColor="gray.100"
|
|
boxSizing="content-box"
|
|
onClick={onClick}
|
|
title={title}
|
|
{...rest}
|
|
>
|
|
{children}
|
|
</Button>
|
|
);
|
|
}
|