Skip to content

Commit

Permalink
Merge pull request #186 from Team-Crops/fix/178-icons-display
Browse files Browse the repository at this point in the history
아이콘 크기 조정
  • Loading branch information
jaewoongs authored Jun 22, 2024
2 parents 7e98386 + 35ba875 commit 2dc02f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
34 changes: 15 additions & 19 deletions src/components/atoms/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';
import Image from 'next/image';

import styled from '@emotion/styled';

import {
AccountIcon,
ArrowDown,
Expand Down Expand Up @@ -314,22 +312,20 @@ export const Icons: React.FC<IconsProps> = ({
);
}

return (
<Container {...props}>
{useCSSColor ? (
<SVGR width={size ?? width} height={size ?? height} style={{ ...style, flexShrink: 0 }} />
) : (
<SVGR
color={color ?? defaultColor}
width={size ?? width}
height={size ?? height}
style={{ ...style, flexShrink: 0 }}
/>
)}
</Container>
return useCSSColor ? (
<SVGR
width={size ?? width}
height={size ?? height}
style={{ ...style, flexShrink: 0 }}
{...props}
/>
) : (
<SVGR
color={color ?? defaultColor}
width={size ?? width}
height={size ?? height}
style={{ ...style, flexShrink: 0 }}
{...props}
/>
);
};

const Container = styled.div`
display: contents;
`;
5 changes: 1 addition & 4 deletions src/components/atoms/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ const ArrowIcon = transientStyled(Icons)<{ $isError: boolean; $isOpened: boolean
right: 10px;
transform: translateY(-50%);
width: 12px;
height: 12px;
transition: 0.25s;
${({ $isError, $isOpened }) =>
Expand Down Expand Up @@ -259,7 +256,7 @@ export const Select: React.FC<SelectProps> & {
<input type="text" readOnly value={value} style={{ display: 'none' }} {...props} />
<SelectButton error={error} value={value} onClick={() => setOpened((prev) => !prev)}>
{label ?? placeholder}
<ArrowIcon icon="arrowDown" $isError={error} $isOpened={isOpened} />
<ArrowIcon icon="arrowDown" size={12} $isError={error} $isOpened={isOpened} />
<OptionList position={optionsPosition} hidden={!isOpened} ref={optionsRef}>
{children}
</OptionList>
Expand Down

0 comments on commit 2dc02f9

Please sign in to comment.