Skip to content

Commit

Permalink
feat(form): FileInput automatically swaps button type to text if chil…
Browse files Browse the repository at this point in the history
…dren exist
  • Loading branch information
mlaursen committed Jul 18, 2021
1 parent 1508812 commit e5585e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/form/src/file-input/FileInput.tsx
Expand Up @@ -78,7 +78,7 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(
children: propChildren,
theme = "primary",
themeType = "contained",
buttonType = "icon",
buttonType = propChildren ? "text" : "icon",
multiple = false,
disableIconSpacing: propDisableIconSpacing,
disableRepeatableFiles = false,
Expand Down
Expand Up @@ -39,7 +39,7 @@ exports[`FileInput should render correctly 2`] = `
value=""
/>
<label
class="rmd-file-input-label rmd-button rmd-button--icon rmd-button--contained rmd-button--primary"
class="rmd-file-input-label rmd-button rmd-button--text rmd-button--contained rmd-button--primary"
for="input"
>
<i
Expand All @@ -65,7 +65,7 @@ exports[`FileInput should render correctly 3`] = `
value=""
/>
<label
class="rmd-file-input-label rmd-button rmd-button--icon rmd-button--contained rmd-button--primary"
class="rmd-file-input-label rmd-button rmd-button--text rmd-button--contained rmd-button--primary"
for="input"
>
Custom children and no Icon
Expand Down

0 comments on commit e5585e1

Please sign in to comment.