4366-feat(front): Clickable Ascending/Descending menu (#4389)
* feat: clickable menu * Remove unused hover --------- Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -7,6 +7,7 @@ import { LightIconButton } from '@/ui/input/button/components/LightIconButton';
|
|||||||
const StyledHeader = styled.li`
|
const StyledHeader = styled.li`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: ${({ theme }) => theme.font.color.primary};
|
color: ${({ theme }) => theme.font.color.primary};
|
||||||
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
font-size: ${({ theme }) => theme.font.size.sm};
|
||||||
font-weight: ${({ theme }) => theme.font.weight.medium};
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||||
@ -14,6 +15,10 @@ const StyledHeader = styled.li`
|
|||||||
padding: ${({ theme }) => theme.spacing(1)};
|
padding: ${({ theme }) => theme.spacing(1)};
|
||||||
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: ${({ theme }) => theme.background.transparent.light};
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledChildrenWrapper = styled.span`
|
const StyledChildrenWrapper = styled.span`
|
||||||
@ -41,12 +46,11 @@ export const DropdownMenuHeader = ({
|
|||||||
testId,
|
testId,
|
||||||
}: DropdownMenuHeaderProps) => {
|
}: DropdownMenuHeaderProps) => {
|
||||||
return (
|
return (
|
||||||
<StyledHeader data-testid={testId}>
|
<StyledHeader data-testid={testId} onClick={onClick}>
|
||||||
{StartIcon && (
|
{StartIcon && (
|
||||||
<LightIconButton
|
<LightIconButton
|
||||||
testId="dropdown-menu-header-end-icon"
|
testId="dropdown-menu-header-end-icon"
|
||||||
Icon={StartIcon}
|
Icon={StartIcon}
|
||||||
onClick={onClick}
|
|
||||||
accent="tertiary"
|
accent="tertiary"
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
@ -56,7 +60,6 @@ export const DropdownMenuHeader = ({
|
|||||||
<StyledLightIconButton
|
<StyledLightIconButton
|
||||||
testId="dropdown-menu-header-end-icon"
|
testId="dropdown-menu-header-end-icon"
|
||||||
Icon={EndIcon}
|
Icon={EndIcon}
|
||||||
onClick={onClick}
|
|
||||||
accent="tertiary"
|
accent="tertiary"
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user