Refactor/dropdown menu (#279)
* Created dropdown menu UI component with story * Added all components for composing Dropdown Menus * Better component naming and reordered stories * Solved comment thread from review
This commit is contained in:
30
front/src/modules/ui/components/menu/DropdownMenuButton.tsx
Normal file
30
front/src/modules/ui/components/menu/DropdownMenuButton.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { hoverBackground } from '@/ui/layout/styles/themes';
|
||||
|
||||
export const DropdownMenuButton = styled.div`
|
||||
--horizontal-padding: ${(props) => props.theme.spacing(1.5)};
|
||||
--vertical-padding: ${(props) => props.theme.spacing(2)};
|
||||
|
||||
padding: var(--vertical-padding) var(--horizontal-padding);
|
||||
|
||||
width: calc(100% - 2 * var(--horizontal-padding));
|
||||
height: calc(32px - 2 * var(--vertical-padding));
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
gap: ${(props) => props.theme.spacing(2)};
|
||||
|
||||
border-radius: ${(props) => props.theme.borderRadius};
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
user-select: none;
|
||||
|
||||
${hoverBackground};
|
||||
|
||||
color: ${(props) => props.theme.text60};
|
||||
font-size: ${(props) => props.theme.fontSizeSmall};
|
||||
`;
|
||||
Reference in New Issue
Block a user