2024-03-29 18:57:52 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-04-14 15:50:12 +02:00
|
|
|
import MuiSelect from '@mui/material/Select';
|
2024-03-29 18:57:52 +01:00
|
|
|
|
2024-03-31 23:34:40 +02:00
|
|
|
export const Select = <Value,>({
|
2024-03-29 18:57:52 +01:00
|
|
|
children,
|
|
|
|
|
maxSelectionHeightPx = 250,
|
|
|
|
|
...props
|
2024-03-31 23:34:40 +02:00
|
|
|
}: React.ComponentProps<typeof MuiSelect<Value>> & { maxSelectionHeightPx?: number }) => (
|
|
|
|
|
<MuiSelect<Value> MenuProps={{ PaperProps: { style: { maxHeight: maxSelectionHeightPx } } }} {...props}>
|
2024-03-29 18:57:52 +01:00
|
|
|
{children}
|
|
|
|
|
</MuiSelect>
|
|
|
|
|
);
|