Fix some icon display size + fix padding issue on EditableChip component (#314)

* Fix some icon display size + fix padding issue on EditableChip component

* Fix according to PR

* Fix server generate and deploy scripts

* Fix image size on Opportunities board

* Fix lint

* Fix according to PR
This commit is contained in:
Charles Bochet
2023-06-16 14:16:35 +02:00
committed by GitHub
parent 98127d1d4c
commit 7f25f16766
18 changed files with 64 additions and 41 deletions

View File

@ -1,3 +1,4 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import {
@ -65,6 +66,7 @@ function SortAndFilterBar<SortField, TData extends FilterableFieldsType>({
onRemoveFilter,
onCancelClick,
}: OwnProps<SortField, TData>) {
const theme = useTheme();
return (
<StyledBar>
<StyledChipcontainer>
@ -76,9 +78,9 @@ function SortAndFilterBar<SortField, TData extends FilterableFieldsType>({
id={sort.key}
icon={
sort.order === 'desc' ? (
<IconArrowNarrowDown />
<IconArrowNarrowDown size={theme.iconSizeMedium} />
) : (
<IconArrowNarrowUp />
<IconArrowNarrowUp size={theme.iconSizeMedium} />
)
}
onRemove={() => onRemoveSort(sort.key)}

View File

@ -1,4 +1,5 @@
import { ReactNode } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { IconX } from '@/ui/icons/index';
@ -50,13 +51,14 @@ function SortOrFilterChip({
icon,
onRemove,
}: OwnProps) {
const theme = useTheme();
return (
<StyledChip>
<StyledIcon>{icon}</StyledIcon>
{labelKey && <StyledLabelKey>{labelKey}:&nbsp;</StyledLabelKey>}
{labelValue}
<StyledDelete onClick={onRemove} data-testid={'remove-icon-' + id}>
<IconX />
<IconX size={theme.iconSizeMedium} />
</StyledDelete>
</StyledChip>
);