mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
36 lines
909 B
TypeScript
36 lines
909 B
TypeScript
import {
|
|
MultiSelect as MantineMultiSelect,
|
|
MultiSelectProps as MantineMultiSelectProps,
|
|
} from '@mantine/core';
|
|
import { CSSProperties } from 'react';
|
|
|
|
import styles from './multi-select.module.css';
|
|
|
|
export interface MultiSelectProps extends MantineMultiSelectProps {
|
|
maxWidth?: CSSProperties['maxWidth'];
|
|
width?: CSSProperties['width'];
|
|
}
|
|
|
|
export const MultiSelect = ({
|
|
classNames,
|
|
maxWidth,
|
|
variant = 'default',
|
|
width,
|
|
...props
|
|
}: MultiSelectProps) => {
|
|
return (
|
|
<MantineMultiSelect
|
|
classNames={{
|
|
dropdown: styles.dropdown,
|
|
input: styles.input,
|
|
option: styles.option,
|
|
root: styles.root,
|
|
...classNames,
|
|
}}
|
|
style={{ maxWidth, width }}
|
|
variant={variant}
|
|
withCheckIcon={false}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|