Skip to content

Commit

Permalink
refactor: 동적 스타일링에 css 대신 styled 스타일 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
ImxYJL committed Aug 1, 2024
1 parent 4f7dc25 commit 795c110
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface FormBodyProps {
}

const FormBody: React.FC<EssentialPropsWithChildren<FormBodyProps>> = ({ direction, children }) => {
return <div css={S.FormBody(direction)}>{children}</div>;
return <S.FormBody direction={direction}>{children}</S.FormBody>;
};

export default FormBody;
5 changes: 2 additions & 3 deletions frontend/src/pages/LandingPage/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { css } from '@emotion/react';
import styled from '@emotion/styled';

import { FormDirection } from './components/FormLayout';
Expand Down Expand Up @@ -38,9 +37,9 @@ export const ReviewAccessFormBody = styled.div`
width: 100%;
`;

export const FormBody = (direction: FormDirection) => css`
export const FormBody = styled.div<{ direction: FormDirection }>`
display: flex;
flex-direction: ${direction === 'col' ? 'column' : 'row'};
flex-direction: ${({ direction }) => (direction === 'col' ? 'column' : 'row')};
gap: 1.6em;
`;

Expand Down

0 comments on commit 795c110

Please sign in to comment.