Skip to content

Commit

Permalink
refactor: 영양기준 컴포넌트 이미지 alt 디테일하게 선언
Browse files Browse the repository at this point in the history
  • Loading branch information
ksone02 committed Aug 3, 2023
1 parent ef19cd0 commit 79325ca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ interface NutritionStandardBlockProps {
const NutritionStandardBlock = (nutritionStandardBlockProps: NutritionStandardBlockProps) => {
const { state, satisfied } = nutritionStandardBlockProps;

const isUs = state === State.us;

return (
<NutritionStandardBlockWrapper>
<StandardInfo>
<img src={state === State.us ? USFlag : EUFlag} alt="국기" />
<img src={isUs ? USFlag : EUFlag} alt={isUs ? '미국' : '유럽'} />
<StateText>{state}</StateText>
</StandardInfo>
<Label
text={satisfied ? '충족' : '불충족'}
hasBorder={false}
backgroundColor={satisfied ? theme.color.blue : theme.color.lightRed}
textColor={!satisfied ? theme.color.warning : theme.color.primary}
textColor={satisfied ? theme.color.primary : theme.color.warning}
width={6}
fontSize={1.3}
fontWeight={700}
Expand Down

0 comments on commit 79325ca

Please sign in to comment.