mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
feat: add dropdown component
This commit is contained in:
17
inertia/components/common/dropdown/dropdown_container.tsx
Normal file
17
inertia/components/common/dropdown/dropdown_container.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
const DropdownContainer = styled.div<{ show: boolean }>(({ show, theme }) => ({
|
||||
position: 'absolute',
|
||||
top: 'calc(100% + 0.5em)',
|
||||
right: 0,
|
||||
minWidth: '175px',
|
||||
backgroundColor: show ? theme.colors.secondary : theme.colors.background,
|
||||
border: `2px solid ${theme.colors.secondary}`,
|
||||
borderRadius: theme.border.radius,
|
||||
boxShadow: theme.colors.boxShadow,
|
||||
display: show ? 'flex' : 'none',
|
||||
flexDirection: 'column',
|
||||
overflow: 'hidden',
|
||||
}));
|
||||
|
||||
export default DropdownContainer;
|
||||
Reference in New Issue
Block a user