Skip to content

Commit 7d89d1e

Browse files
committed
add: name prop support to DropZone
To enable uncontrolled component use cases
1 parent ac6fb70 commit 7d89d1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

polaris-react/src/components/DropZone/DropZone.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export interface DropZoneProps {
4545
labelHidden?: boolean;
4646
/** ID for file input */
4747
id?: string;
48+
/** name for file input */
49+
name?: string;
4850
/** Allowed file types */
4951
accept?: string;
5052
/**
@@ -117,6 +119,7 @@ export const DropZone: React.FunctionComponent<DropZoneProps> & {
117119
label,
118120
labelAction,
119121
labelHidden,
122+
name,
120123
children,
121124
disabled = false,
122125
outline = true,
@@ -437,6 +440,7 @@ export const DropZone: React.FunctionComponent<DropZoneProps> & {
437440
accept={accept}
438441
disabled={disabled}
439442
multiple={allowMultiple}
443+
name={name}
440444
onChange={handleDrop}
441445
onFocus={handleFocus}
442446
onBlur={handleBlur}

0 commit comments

Comments
 (0)