Files
twenty_crm/front/src/modules/ui/board/components/NewButton.tsx
Emilien Chauvet 5fb7d753ef Various styling improvements (#766)
* Various styling improvements

* Add card styling

* Fix select when editing fields

* Add colors

* Refactor prevent click
2023-07-19 15:31:53 -07:00

37 lines
872 B
TypeScript

import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { IconPlus } from '@/ui/icon/index';
const StyledButton = styled.button`
align-items: center;
align-self: baseline;
background-color: ${({ theme }) => theme.background.primary};
border: none;
border-radius: ${({ theme }) => theme.border.radius.md};
color: ${({ theme }) => theme.font.color.tertiary};
cursor: pointer;
display: flex;
gap: ${({ theme }) => theme.spacing(1)};
padding: ${({ theme }) => theme.spacing(1)};
&:hover {
background-color: ${({ theme }) => theme.background.tertiary};
}
`;
type OwnProps = {
onClick: () => void;
};
export function NewButton({ onClick }: OwnProps) {
const theme = useTheme();
return (
<StyledButton onClick={onClick}>
<IconPlus size={theme.icon.size.md} />
New
</StyledButton>
);
}