From d4216181b27b3493ff28a9a58c00321a4fdde582 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 8 Nov 2024 20:43:56 +0000 Subject: [PATCH 1/3] feat(TextInput): Convert UnstyledTextInput to use CSS modules behind feature flag --- packages/react/src/Select/Select.tsx | 3 +- .../TextInputWithTokens.module.css | 3 ++ .../TextInputWithTokens.tsx | 10 +++- .../components/UnstyledTextInput.module.css | 13 +++++ .../internal/components/UnstyledTextInput.tsx | 51 ++++++++++++++----- 5 files changed, 63 insertions(+), 17 deletions(-) create mode 100644 packages/react/src/TextInputWithTokens/TextInputWithTokens.module.css create mode 100644 packages/react/src/internal/components/UnstyledTextInput.module.css diff --git a/packages/react/src/Select/Select.tsx b/packages/react/src/Select/Select.tsx index 36152a035b7..ae5f8329427 100644 --- a/packages/react/src/Select/Select.tsx +++ b/packages/react/src/Select/Select.tsx @@ -6,6 +6,7 @@ import TextInputWrapper from '../internal/components/TextInputWrapper' import {toggleStyledComponent} from '../internal/utils/toggleStyledComponent' import {useFeatureFlag} from '../FeatureFlags' import classes from './Select.module.css' +import type {ForwardRefComponent as PolymorphicForwardRefComponent} from '../utils/polymorphic' export type SelectProps = Omit< Omit, 'size'> & Omit, @@ -167,7 +168,7 @@ const Select = React.forwardRef( ) }, -) +) as PolymorphicForwardRefComponent<'select', SelectProps> const Option: React.FC & {value: string}>> = props => (