Skip to content

Commit

Permalink
Made SelectEx variant property optional again
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Feb 27, 2024
1 parent b5ba6bc commit 1b7c350
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/select/src/components/SelectEx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { PaletteMode, Select, SelectProps, SelectVariants, useTheme } from '@mui
import { merge } from '@xylabs/lodash'
import React from 'react'

export type SelectExProps<T, V extends SelectVariants = SelectVariants> = SelectProps<T, V> & {
colorize?: 'primary' | 'secondary'
mode?: PaletteMode
}
export type SelectExProps<T, V extends SelectVariants = SelectVariants> = Omit<SelectProps<T, V>, 'variant'> &
Partial<SelectProps<T, V>> & {
colorize?: 'primary' | 'secondary'
mode?: PaletteMode
}

export const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {
const theme = useTheme()
Expand Down

0 comments on commit 1b7c350

Please sign in to comment.