Skip to content

Commit 1a0066c

Browse files
authored
chore: remove unnecessary variant prop (#861)
Remove unnecessary variant prop that was previously introduced in PLU-405. - Variant was added to create a custom component in Executions page to combine a borderless SingleSelect with an ExecutionStatusMenu - However, team adopted the same layout as the Pipes page, making this custom variant no longer necessary.
1 parent 38511cd commit 1a0066c

File tree

4 files changed

+0
-33
lines changed

4 files changed

+0
-33
lines changed

packages/frontend/src/components/SingleSelect/SelectContext.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export interface SharedSelectContextReturnProps<
3535
isRefreshLoading?: boolean
3636
/** Controls if user can add one arbitrary item of their choosing. */
3737
freeSolo?: boolean
38-
/** Variant of the select */
39-
variant?: string
4038
}
4139

4240
interface SelectContextReturn<Item extends ComboboxItem = ComboboxItem>

packages/frontend/src/components/SingleSelect/SingleSelectProvider.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export interface SingleSelectProviderProps<
6161
onSelected: (value: string) => void
6262
isCreating: boolean
6363
}
64-
variant?: string
6564
}
6665

6766
function constructFreeSoloItem(freeSoloValue: string) {
@@ -98,7 +97,6 @@ export const SingleSelectProvider = ({
9897
isRefreshLoading = false,
9998
freeSolo = false,
10099
addNew,
101-
variant,
102100
}: SingleSelectProviderProps): JSX.Element => {
103101
const theme = useTheme()
104102
// Required in case size is set in theme, we should respect the one set in theme.
@@ -354,7 +352,6 @@ export const SingleSelectProvider = ({
354352
size,
355353
isClearable,
356354
colorScheme,
357-
variant,
358355
})
359356

360357
const virtualListHeight = useMemo(() => {
@@ -411,7 +408,6 @@ export const SingleSelectProvider = ({
411408
isRefreshLoading,
412409
freeSolo,
413410
isCreatingNewOption: addNew?.isCreating,
414-
variant: variant ?? 'default',
415411
}}
416412
>
417413
{children}

packages/frontend/src/components/SingleSelect/components/SelectCombobox/SelectCombobox.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const SelectCombobox = forwardRef<HTMLInputElement>(
3636
inputRef,
3737
isClearable,
3838
size,
39-
variant,
4039
} = useSelectContext()
4140

4241
const mergedInputRef = useMergeRefs(inputRef, ref)
@@ -127,7 +126,6 @@ export const SelectCombobox = forwardRef<HTMLInputElement>(
127126
required: isRequired,
128127
'aria-expanded': !!isOpen,
129128
})}
130-
variant={variant}
131129
/>
132130
<ToggleChevron />
133131
</InputGroup>

packages/frontend/src/theme/components/SingleSelect.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,6 @@ const baseStyle = definePartsStyle((props) => {
3333
}
3434
})
3535

36-
const borderless = definePartsStyle({
37-
field: {
38-
bg: 'utility.ui',
39-
borderRadius: 'base',
40-
fontSize: '0.875rem',
41-
gridArea: '1 / 1 / 2 / 3',
42-
h: '2.5rem',
43-
px: '0.75rem',
44-
textStyle: 'body-2',
45-
border: 'none!important',
46-
_focus: {
47-
border: 'none!important',
48-
boxShadow: 'none!important',
49-
},
50-
_active: {
51-
border: 'none!important',
52-
boxShadow: 'none!important',
53-
},
54-
_placeholder: {
55-
color: 'interaction.support.placeholder',
56-
},
57-
},
58-
})
59-
6036
export const SingleSelect = defineMultiStyleConfig({
6137
baseStyle,
62-
variants: { borderless },
6338
})

0 commit comments

Comments
 (0)