diff --git a/packages/common/business_components/src/ui/index.ts b/packages/common/business_components/src/ui/index.ts index 1876f2b50..6bf01157c 100644 --- a/packages/common/business_components/src/ui/index.ts +++ b/packages/common/business_components/src/ui/index.ts @@ -2,5 +2,8 @@ export * from "./chart"; export * from "./file-upload"; export * from "./form"; export * from "./search_form"; +export * from "./search_input"; +export * from "./search_input_select"; export * from "./select"; export * from "./table"; + diff --git a/packages/common/business_components/src/ui/search_input/index.tsx b/packages/common/business_components/src/ui/search_input/index.tsx new file mode 100644 index 000000000..f933428fc --- /dev/null +++ b/packages/common/business_components/src/ui/search_input/index.tsx @@ -0,0 +1,16 @@ +import { Input, Label } from "@common/components"; +import React from "react"; + +const SearchInput = React.forwardRef< + HTMLDivElement& HTMLInputElement, + React.HTMLAttributes & {className:string, label:string}> +(({className, label}, ref) => { + console.log(ref); + return ( +
+ {label && } + +
+ ) +}); +export { SearchInput }; diff --git a/packages/common/business_components/src/ui/search_input_select/index.tsx b/packages/common/business_components/src/ui/search_input_select/index.tsx new file mode 100644 index 000000000..b00615e4b --- /dev/null +++ b/packages/common/business_components/src/ui/search_input_select/index.tsx @@ -0,0 +1,38 @@ +import { Input, Label } from "@common/components"; +import React from "react"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../select/lib/selectBox"; +export type SelectDataType = { + text: string; + val: string; +} +/** + * 검색 입력 및 선택 컴포넌트 + * @param className - string tailwindcss class + * @param label - string label + * @param selectData - SelectDataType[] 선택 데이터 + * @param onSelectValue - (val:string)=>void 선택 값 콜백 + * @param refs - React.forwardRef | null 입력값 ref + * @returns React.FC + */ +const SearchInputSelect = React.forwardRefvoid}>(({className, label, selectData, onSelectValue}, refs) => { + return ( +
+ {label && } +
+ + +
+
+ ) +}); +export { SearchInputSelect }; diff --git a/packages/common/business_components/src/ui/select/index.tsx b/packages/common/business_components/src/ui/select/index.tsx index d1adbb970..dd92774fe 100644 --- a/packages/common/business_components/src/ui/select/index.tsx +++ b/packages/common/business_components/src/ui/select/index.tsx @@ -16,10 +16,10 @@ const SelectBox = React.forwardRef< const placeHolder = selectArray?.[0]?.text ?? ""; return ( -
- {label && } +
+ {label && }