This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7529](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7529). --- ### Description - Migrated all button components to `twenty-ui` \ \ `Button`\ `ButtonGroup`\ `ColorPickerButton`\ `FloatingButton`\ `FloatingButtonGroup`\ `FloatingIconButton`\ `FloatingIconButtonGroup`\ `IconButton`\ `IconButtonGroup`\ `LightButton`\ `LightIconButton`\ `LightIconButtonGroup`\ `MainButton`\ \ Fixes twentyhq/private-issues#89 Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
28 lines
665 B
TypeScript
28 lines
665 B
TypeScript
import styled from '@emotion/styled';
|
|
import { IconButton, IconChevronDown, IconChevronUp } from 'twenty-ui';
|
|
|
|
type EventCardToggleButtonProps = {
|
|
isOpen: boolean;
|
|
setIsOpen: (isOpen: boolean) => void;
|
|
};
|
|
|
|
const StyledButtonContainer = styled.div`
|
|
border-radius: ${({ theme }) => theme.border.radius.sm};
|
|
`;
|
|
|
|
export const EventCardToggleButton = ({
|
|
isOpen,
|
|
setIsOpen,
|
|
}: EventCardToggleButtonProps) => {
|
|
return (
|
|
<StyledButtonContainer>
|
|
<IconButton
|
|
Icon={isOpen ? IconChevronUp : IconChevronDown}
|
|
onClick={() => setIsOpen(!isOpen)}
|
|
size="small"
|
|
variant="secondary"
|
|
/>
|
|
</StyledButtonContainer>
|
|
);
|
|
};
|