diff --git a/src/components/input/Input.tsx b/src/components/input/Input.tsx index 3807a01..9616a59 100644 --- a/src/components/input/Input.tsx +++ b/src/components/input/Input.tsx @@ -1,5 +1,6 @@ import type { HTMLInputTypeAttribute } from 'react'; import input from './input.module.scss'; +import { getCssNameBySize } from '@/utils/index'; interface InputProps { type?: HTMLInputTypeAttribute; @@ -13,17 +14,6 @@ interface InputProps { validationMessage?: string; } -const getCssNameBySize = (size: 'sm' | 'md' | 'lg') => { - switch (size) { - case 'sm': - return '--small'; - case 'md': - return '--medium'; - case 'lg': - return '--large'; - } -}; - export const Input = ({ type, minLength, diff --git a/src/components/input/input.module.scss b/src/components/input/input.module.scss index 5ea8fed..07589b8 100644 --- a/src/components/input/input.module.scss +++ b/src/components/input/input.module.scss @@ -13,6 +13,10 @@ } } +.kraken { + background-color: green; +} + .m_invalid { border: 1px solid rgb(255, 124, 124); diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..3280259 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,10 @@ +export const getCssNameBySize = (size: 'sm' | 'md' | 'lg') => { + switch (size) { + case 'sm': + return '--small'; + case 'md': + return '--medium'; + case 'lg': + return '--large'; + } +}; diff --git a/tsconfig.json b/tsconfig.json index fa03658..e6776ff 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,8 @@ "paths": { "@/components/*": ["./src/components/*"], "@/services/*": ["./src/services/*"], - "@/pages/*": ["./src/pages/*"] + "@/pages/*": ["./src/pages/*"], + "@/utils/*": ["./src/utils/*"] }, /* Linting */ diff --git a/vite.config.ts b/vite.config.ts index 0e18f72..df1198e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,6 +18,10 @@ export default defineConfig({ find: '@/pages', replacement: '/src/pages', }, + { + find: '@/utils', + replacement: '/src/utils', + }, ], }, optimizeDeps: {