diff --git a/packages/co-design-core/src/components/Button/Button.tsx b/packages/co-design-core/src/components/Button/Button.tsx index 1098df1..28c3a26 100644 --- a/packages/co-design-core/src/components/Button/Button.tsx +++ b/packages/co-design-core/src/components/Button/Button.tsx @@ -1,5 +1,5 @@ import React, { forwardRef } from 'react'; -import { CoComponentProps, CoSize, CoPalette, PolymorphicComponentProps, PolymorphicRef, useCoTheme, ClassNames } from '@co-design/styles'; +import { CoComponentProps, CoSize, PolymorphicComponentProps, PolymorphicRef, useCoTheme, ClassNames } from '@co-design/styles'; import { View } from '../View'; import useStyles, { ButtonVariant } from './Button.style'; import { Spinner, SpinnerProps } from '../Spinner'; diff --git a/packages/co-design-core/src/components/Switch/Switch.style.ts b/packages/co-design-core/src/components/Switch/Switch.style.ts index 835791a..bbe8967 100644 --- a/packages/co-design-core/src/components/Switch/Switch.style.ts +++ b/packages/co-design-core/src/components/Switch/Switch.style.ts @@ -1,13 +1,12 @@ -import { createStyles, CoSize, CoPalette, defaultFontStyles } from '@co-design/styles'; +import { createStyles, CoSize, defaultFontStyles } from '@co-design/styles'; import { getFieldValue } from '../../utils'; interface SwitchStyles { - color: CoPalette; size: CoSize; disabled: boolean; } -export default createStyles((theme, { size, color, disabled }: SwitchStyles) => { +export default createStyles((theme, { size, disabled }: SwitchStyles) => { const switchHeight = { xsmall: 16, small: 16, diff --git a/packages/co-design-core/src/components/Switch/Switch.tsx b/packages/co-design-core/src/components/Switch/Switch.tsx index 5b42035..3581c94 100644 --- a/packages/co-design-core/src/components/Switch/Switch.tsx +++ b/packages/co-design-core/src/components/Switch/Switch.tsx @@ -1,6 +1,6 @@ import React, { forwardRef } from 'react'; import { useId } from '@co-design/hooks'; -import { CoComponentProps, CoSize, CoPalette, ClassNames, useCoTheme } from '@co-design/styles'; +import { CoComponentProps, ClassNames } from '@co-design/styles'; import { View } from '../View'; import useStyles from './Switch.style'; @@ -15,9 +15,6 @@ export interface SwitchProps /** 우측 영역에 label을 추가합니다. */ label?: React.ReactNode; - /** Switch 컴포넌트의 색상을 정합니다. */ - color?: CoPalette; - /** Switch 컴포넌트의 크기를 정합니다. */ size?: 'small' | 'medium'; @@ -26,10 +23,8 @@ export interface SwitchProps } export const Switch = forwardRef( - ({ id, size = 'small', color, label, className, style, co, overrideStyles, disabled = false, ...props }: SwitchProps, ref) => { - const theme = useCoTheme(); - const _color = color || theme.primaryColor; - const { classes, cx } = useStyles({ size, color: _color, disabled }, { overrideStyles, name: 'Switch' }); + ({ id, size = 'small', label, className, style, co, overrideStyles, disabled = false, ...props }: SwitchProps, ref) => { + const { classes, cx } = useStyles({ size, disabled }, { overrideStyles, name: 'Switch' }); const uuid = useId(id); return ( diff --git a/packages/co-design-core/src/components/Toast/Toast.tsx b/packages/co-design-core/src/components/Toast/Toast.tsx index ad6dddb..157a1dc 100644 --- a/packages/co-design-core/src/components/Toast/Toast.tsx +++ b/packages/co-design-core/src/components/Toast/Toast.tsx @@ -5,7 +5,6 @@ import ToastIcon from './ToastIcon'; import useStyles from './Toast.style'; import { View } from '../View'; import { Button } from '../Button'; -import { IconButton } from '../IconButton'; export type ToastStylesNames = ClassNames; diff --git a/packages/co-design-core/src/components/Toast/stories/ToastArea.stories.tsx b/packages/co-design-core/src/components/Toast/stories/ToastArea.stories.tsx index 4c9a1f9..d1aeffd 100644 --- a/packages/co-design-core/src/components/Toast/stories/ToastArea.stories.tsx +++ b/packages/co-design-core/src/components/Toast/stories/ToastArea.stories.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import Toast from '../core'; export default { @@ -6,7 +6,7 @@ export default { }; export const Default = { - render: (props) => { + render: () => { useEffect(() => { Toast.success('마운트 시 알림'); }, []);