feat: add Color calendar setting (#4141)

* feat: add Color calendar setting

Closes #4067

* fix: fix wrong imports

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2024-02-24 08:34:56 -03:00
committed by GitHub
parent 0fe838d320
commit a993155fb0
5 changed files with 115 additions and 5 deletions

View File

@ -0,0 +1,34 @@
import styled from '@emotion/styled';
import { ColorPickerButton } from '@/ui/input/button/components/ColorPickerButton';
import { Card } from '@/ui/layout/card/components/Card';
import { CardContent } from '@/ui/layout/card/components/CardContent';
import { mainColorNames, ThemeColor } from '@/ui/theme/constants/colors';
type SettingsAccountsColorSettingCardProps = {
onChange: (nextValue: ThemeColor) => void;
value: ThemeColor;
};
const StyledCardContent = styled(CardContent)`
display: flex;
padding: ${({ theme }) => theme.spacing(2, 4)};
justify-content: space-between;
`;
export const SettingsAccountsColorSettingCard = ({
onChange,
value,
}: SettingsAccountsColorSettingCardProps) => (
<Card>
<StyledCardContent>
{mainColorNames.map((colorName) => (
<ColorPickerButton
colorName={colorName}
isSelected={value === colorName}
onClick={() => onChange(colorName)}
/>
))}
</StyledCardContent>
</Card>
);