Adjust base component styles

This commit is contained in:
jeffvli 2022-12-22 01:59:02 -08:00
parent 57c34637cf
commit a4584ecd5c
4 changed files with 8 additions and 5 deletions

View File

@ -162,7 +162,7 @@ const StyledButton = styled(MantineButton)<StyledButtonProps>`
}
&:active {
transform: scale(0.98);
transform: none;
}
& .mantine-Button-centerLoader {

View File

@ -6,7 +6,7 @@ import type {
MenuDropdownProps as MantineMenuDropdownProps,
} from '@mantine/core';
import { Menu as MantineMenu, createPolymorphicComponent } from '@mantine/core';
import { RiArrowLeftLine } from 'react-icons/ri';
import { RiArrowLeftSFill } from 'react-icons/ri';
import styled from 'styled-components';
type MenuProps = MantineMenuProps;
@ -42,7 +42,7 @@ const StyledMenuItem = styled(MantineMenu.Item)<MenuItemProps>`
}
& .mantine-Menu-itemLabel {
color: ${({ $isActive }) => ($isActive ? 'var(--primary-color)' : 'var(--dropdown-menu-fg)')};
color: var(--dropdown-menu-fg);
font-weight: 500;
font-size: 1em;
}
@ -68,6 +68,7 @@ const StyledMenuDivider = styled(MantineMenu.Divider)`
export const DropdownMenu = ({ children, ...props }: MenuProps) => {
return (
<StyledMenu
withArrow
withinPortal
radius="sm"
styles={{
@ -91,7 +92,7 @@ const pMenuItem = ({ $isActive, children, ...props }: MenuItemProps) => {
return (
<StyledMenuItem
$isActive={$isActive}
rightSection={$isActive && <RiArrowLeftLine />}
rightSection={$isActive && <RiArrowLeftSFill size={20} />}
{...props}
>
{children}

View File

@ -27,6 +27,7 @@ export const Popover = ({ children, ...props }: PopoverProps) => {
filter: 'drop-shadow(0 0 5px rgb(0, 0, 0, 50%))',
},
}}
transition="scale"
{...props}
>
{children}

View File

@ -47,10 +47,11 @@ export const SearchInput = ({
input: {
backgroundColor: isOpened ? 'inherit' : 'transparent !important',
border: 'none !important',
cursor: isOpened ? 'text' : 'pointer',
padding: isOpened ? '10px' : 0,
},
}}
width={isOpened ? openedWidth || 200 : initialWidth || 50}
width={isOpened ? openedWidth || 150 : initialWidth || 50}
onChange={onChange}
onKeyDown={handleEscape}
/>