Changed Filter/sort labels font weight to medium instead of bold. (#4500)
* changed font weight to 500 for filter/sort labels * Removed isSort prop and StyledChipProps type
This commit is contained in:
@ -27,7 +27,6 @@ export const EditableSortChip = ({ viewSort }: EditableSortChipProps) => {
|
|||||||
testId={viewSort.fieldMetadataId}
|
testId={viewSort.fieldMetadataId}
|
||||||
labelValue={viewSort.definition.label}
|
labelValue={viewSort.definition.label}
|
||||||
Icon={viewSort.direction === 'desc' ? IconArrowDown : IconArrowUp}
|
Icon={viewSort.direction === 'desc' ? IconArrowDown : IconArrowUp}
|
||||||
isSort
|
|
||||||
onRemove={handleRemoveClick}
|
onRemove={handleRemoveClick}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -4,11 +4,7 @@ import styled from '@emotion/styled';
|
|||||||
import { IconX } from '@/ui/display/icon/index';
|
import { IconX } from '@/ui/display/icon/index';
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
|
|
||||||
type StyledChipProps = {
|
const StyledChip = styled.div`
|
||||||
isSort?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
const StyledChip = styled.div<StyledChipProps>`
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: ${({ theme }) => theme.accent.quaternary};
|
background-color: ${({ theme }) => theme.accent.quaternary};
|
||||||
border: 1px solid ${({ theme }) => theme.accent.tertiary};
|
border: 1px solid ${({ theme }) => theme.accent.tertiary};
|
||||||
@ -19,7 +15,7 @@ const StyledChip = styled.div<StyledChipProps>`
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
font-size: ${({ theme }) => theme.font.size.sm};
|
||||||
font-weight: ${({ isSort }) => (isSort ? 'bold' : 'normal')};
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||||
padding: ${({ theme }) => theme.spacing(1) + ' ' + theme.spacing(2)};
|
padding: ${({ theme }) => theme.spacing(1) + ' ' + theme.spacing(2)};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
`;
|
`;
|
||||||
@ -54,7 +50,6 @@ type SortOrFilterChipProps = {
|
|||||||
Icon?: IconComponent;
|
Icon?: IconComponent;
|
||||||
onRemove: () => void;
|
onRemove: () => void;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
isSort?: boolean;
|
|
||||||
testId?: string;
|
testId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -63,7 +58,6 @@ export const SortOrFilterChip = ({
|
|||||||
labelValue,
|
labelValue,
|
||||||
Icon,
|
Icon,
|
||||||
onRemove,
|
onRemove,
|
||||||
isSort,
|
|
||||||
testId,
|
testId,
|
||||||
onClick,
|
onClick,
|
||||||
}: SortOrFilterChipProps) => {
|
}: SortOrFilterChipProps) => {
|
||||||
@ -75,7 +69,7 @@ export const SortOrFilterChip = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledChip isSort={isSort} onClick={onClick}>
|
<StyledChip onClick={onClick}>
|
||||||
{Icon && (
|
{Icon && (
|
||||||
<StyledIcon>
|
<StyledIcon>
|
||||||
<Icon size={theme.icon.size.sm} />
|
<Icon size={theme.icon.size.sm} />
|
||||||
|
|||||||
Reference in New Issue
Block a user