Skip to content

Commit

Permalink
refactor: shared/types 폴더 추가 및 Props type 파일 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
bytrustu committed Feb 29, 2024
1 parent d72819c commit e2d6158
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/shared/components/Box/Box.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropsWithChildren } from 'react';
import styled from '@emotion/styled';
import { AsProps, StyleProps } from '@/shared/styles';
import { DefaultStyled } from '@/shared/styles/DefaultStyled.tsx';
import { DefaultStyled } from '@/shared/styles';
import type { AsProps, StyleProps } from '@/shared/types';

type BoxProps = PropsWithChildren<StyleProps & AsProps>;

Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/HStack/HStack.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropsWithChildren } from 'react';
import styled from '@emotion/styled';
import { AsProps, StyleProps } from '@/shared/styles';
import { DefaultStyled } from '@/shared/styles/DefaultStyled.tsx';
import { DefaultStyled } from '@/shared/styles';
import type { AsProps, StyleProps } from '@/shared/types';

type HStackProps = PropsWithChildren<StyleProps & AsProps>;

Expand Down
3 changes: 2 additions & 1 deletion src/shared/components/VStack/VStack.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PropsWithChildren } from 'react';
import styled from '@emotion/styled';
import { AsProps, DefaultStyled, StyleProps } from '@/shared/styles';
import { DefaultStyled } from '@/shared/styles';
import type { AsProps, StyleProps } from '@/shared/types';

type VStackProps = PropsWithChildren<StyleProps & AsProps>;
export const VStack = ({ children, ...props }: VStackProps) => <Root {...props}>{children}</Root>;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/styles/DefaultStyled.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled';
import { AsProps, StyleProps } from '@/shared/styles';
import type { AsProps, StyleProps } from '@/shared/types';

type DefaultStyledProps = StyleProps & AsProps;

Expand Down
2 changes: 0 additions & 2 deletions src/shared/styles/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export * from './AsProps.type';
export * from './DefaultStyled';
export * from './GlobalStyles';
export * from './storybookControls';
export * from './StyleProps.type';
export * from './styleToken';
1 change: 1 addition & 0 deletions src/shared/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './props/index';
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/shared/types/props/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './AsProps.type';
export * from './StyleProps.type';

0 comments on commit e2d6158

Please sign in to comment.