Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions packages/mui-material/src/Select/Select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,26 @@ export interface BaseSelectProps<Value = unknown>
variant?: SelectVariants;
}

export interface FilledSelectProps extends Omit<FilledInputProps, 'value' | 'onChange'> {
export interface FilledSelectProps
extends Omit<FilledInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
/**
* The variant to use.
* @default 'outlined'
*/
variant: 'filled';
}

export interface StandardSelectProps extends Omit<InputProps, 'value' | 'onChange'> {
export interface StandardSelectProps
extends Omit<InputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
/**
* The variant to use.
* @default 'outlined'
*/
variant: 'standard';
}

export interface OutlinedSelectProps extends Omit<OutlinedInputProps, 'value' | 'onChange'> {
export interface OutlinedSelectProps
extends Omit<OutlinedInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
/**
* The variant to use.
* @default 'outlined'
Expand All @@ -193,8 +196,8 @@ export type SelectProps<Value = unknown> =
* - [Select API](https://mui.com/material-ui/api/select/)
* - inherits [OutlinedInput API](https://mui.com/material-ui/api/outlined-input/)
*/
export default function Select<Value = unknown>(
props: SelectProps<Value>,
): JSX.Element & {
declare const Select: (<Value = unknown>(props: SelectProps<Value>) => JSX.Element) & {
muiName: string;
};

export default Select;
3 changes: 3 additions & 0 deletions packages/mui-material/src/Select/Select.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,6 @@ const AppSelect = <T extends string>(props: Props<T>) => {
</Select>
);
};

// test for applying Select's static muiName property type to wrapper components
AppSelect.muiName = Select.muiName;