Skip to content

Commit 8cffda0

Browse files
committed
[@mantine/core] FileInput: Add missing component prop
1 parent b2ce007 commit 8cffda0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@mantine/core/src/components/FileInput/FileInput.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export interface FileInputProps<Multiple = false>
1111
__BaseInputProps,
1212
StylesApiProps<FileInputFactory>,
1313
ElementProps<'button', 'value' | 'defaultValue' | 'onChange' | 'placeholder'> {
14+
component?: any;
15+
1416
/** Called when value changes */
1517
onChange?: (payload: Multiple extends true ? File[] : File | null) => void;
1618

@@ -95,6 +97,7 @@ const _FileInput = factory<FileInputFactory>((_props, ref) => {
9597
rightSection,
9698
size,
9799
placeholder,
100+
component,
98101
resetRef: resetRefProp,
99102
...others
100103
} = props;
@@ -144,7 +147,7 @@ const _FileInput = factory<FileInputFactory>((_props, ref) => {
144147
>
145148
{(fileButtonProps) => (
146149
<InputBase
147-
component="button"
150+
component={component || 'button'}
148151
ref={ref}
149152
rightSection={_rightSection}
150153
{...fileButtonProps}

0 commit comments

Comments
 (0)