Skip to content

Commit

Permalink
[FE] FEAT: 컨벤션에 맞도록 컴포넌트명 수정 #1649
Browse files Browse the repository at this point in the history
  • Loading branch information
gykoh42 committed Sep 25, 2024
1 parent 0b7e061 commit 6cd7b0a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions frontend/src/Cabinet/components/Common/DarkModeToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ const DarkModeToggleSwitch = ({ id }: { id: string }) => {
const isDarkMode = displayStyleType === DisplayStyleType.DARK;

return (
<ToggleSwitchContainer>
<ToggleWrapperStyled>
<CheckboxStyled id={id} checked={isDarkMode} onChange={handleToggle} />
<ToggleSwitchStyled htmlFor={id} isChecked={isDarkMode}>
<MoonIconWrapper>
<MoonIconWrapperStyled>
<MoonIcon />
</MoonIconWrapper>
<SunIconWrapper>
</MoonIconWrapperStyled>
<SunIconWrapperStyled>
<SunIcon />
</SunIconWrapper>
</SunIconWrapperStyled>
<ToggleKnobStyled isChecked={isDarkMode} />
</ToggleSwitchStyled>
</ToggleSwitchContainer>
</ToggleWrapperStyled>
);
};

const ToggleSwitchContainer = styled.div`
const ToggleWrapperStyled = styled.div`
display: inline-block;
position: relative;
margin-right: 10px;
Expand Down Expand Up @@ -125,7 +125,7 @@ const ToggleKnobStyled = styled.span<{ isChecked: boolean }>`
transition: left 0.2s;
`;

const MoonIconWrapper = styled.div`
const MoonIconWrapperStyled = styled.div`
position: absolute;
left: 5px;
top: 50%;
Expand All @@ -140,7 +140,7 @@ const MoonIconWrapper = styled.div`
}
`;

const SunIconWrapper = styled.div`
const SunIconWrapperStyled = styled.div`
position: absolute;
right: 5px;
top: 50%;
Expand Down

0 comments on commit 6cd7b0a

Please sign in to comment.