From d1101f224a99ab52a1c376e527a4dfba9b067912 Mon Sep 17 00:00:00 2001 From: scottrepreneur Date: Thu, 28 Dec 2023 10:28:33 -0600 Subject: [PATCH] tweaks fix export --- package.json | 2 +- .../forms/CreatableSelect/CreatableSelect.tsx | 1 + src/components/forms/CreatableSelect/index.ts | 2 +- .../forms/NumberInput/NumberInput.tsx | 31 ++++++++++--------- .../ControlledSelect/ControlledSelect.tsx | 18 +++++++++-- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index e863bbb..fe91360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@raidguild/design-system", - "version": "0.5.5", + "version": "0.5.6", "license": "MIT", "author": "Raid Guild", "main": "./dist/src/index.js", diff --git a/src/components/forms/CreatableSelect/CreatableSelect.tsx b/src/components/forms/CreatableSelect/CreatableSelect.tsx index 5284c92..03a7efd 100644 --- a/src/components/forms/CreatableSelect/CreatableSelect.tsx +++ b/src/components/forms/CreatableSelect/CreatableSelect.tsx @@ -16,6 +16,7 @@ export type Option = | { value: null; label: string } | { label: string | number; value: string | number } | { value: number; label: string }; + export interface CreatableSelectProps { name: string; label?: string | React.ReactNode; diff --git a/src/components/forms/CreatableSelect/index.ts b/src/components/forms/CreatableSelect/index.ts index 5f7dbf0..7b0f845 100644 --- a/src/components/forms/CreatableSelect/index.ts +++ b/src/components/forms/CreatableSelect/index.ts @@ -1,2 +1,2 @@ export { default as CreatableSelect } from './CreatableSelect'; -export type { CreatableSelectProps } from './CreatableSelect'; +export type { CreatableSelectProps, Option } from './CreatableSelect'; diff --git a/src/components/forms/NumberInput/NumberInput.tsx b/src/components/forms/NumberInput/NumberInput.tsx index 2f51465..aded1e2 100644 --- a/src/components/forms/NumberInput/NumberInput.tsx +++ b/src/components/forms/NumberInput/NumberInput.tsx @@ -74,20 +74,23 @@ const NumberInput = ({ m={0} > - - {label && {label}} - {tooltip && ( - - - - )} - + {label && ( + + {label && {label}} + {tooltip && ( + + + + )} + + )} + ; + const ControlledSelect: React.FC = ({ label, placeholder, @@ -78,7 +90,7 @@ const ControlledSelect: React.FC = ({ }; return ( - + {label && {label}}