Skip to content

Commit

Permalink
fix(icon): FileInput default icon changed from file_download to `fi…
Browse files Browse the repository at this point in the history
…le_upload`

Closes #1325
  • Loading branch information
mlaursen committed Dec 31, 2021
1 parent b5f93ae commit 174d1c1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
Expand Up @@ -8,7 +8,7 @@ import {
ConfigurableIcons,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -25,7 +25,7 @@ import navItems from "./navItems";
const icons: ConfigurableIcons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions examples/create-react-app/src/components/Layout/Layout.js
Expand Up @@ -6,7 +6,7 @@ import {
CheckSVGIcon,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -23,7 +23,7 @@ import navItems from './navItems';
const icons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions examples/gatsby-typescript/src/components/Layout/Layout.jsx
Expand Up @@ -5,7 +5,7 @@ import {
CheckSVGIcon,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -23,7 +23,7 @@ import navItems from "./navItems"
const icons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions examples/gatsby/src/components/Layout/Layout.jsx
Expand Up @@ -5,7 +5,7 @@ import {
CheckSVGIcon,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -23,7 +23,7 @@ import navItems from "./navItems"
const icons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs-typescript/src/components/Layout/Layout.tsx
Expand Up @@ -8,7 +8,7 @@ import {
ConfigurableIcons,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -26,7 +26,7 @@ import navItems from "./navItems";
const icons: ConfigurableIcons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs/src/components/Layout/Layout.jsx
Expand Up @@ -6,7 +6,7 @@ import {
CheckSVGIcon,
Configuration,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand All @@ -24,7 +24,7 @@ import navItems from './navItems';
const icons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
Expand Down
4 changes: 2 additions & 2 deletions packages/documentation/src/components/Layout/Layout.tsx
Expand Up @@ -12,7 +12,7 @@ import {
CheckBoxSVGIcon,
CheckSVGIcon,
ErrorOutlineSVGIcon,
FileDownloadSVGIcon,
FileUploadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
Expand Down Expand Up @@ -50,7 +50,7 @@ const icons: ConfiguredIcons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
download: <FileDownloadSVGIcon />,
download: <FileUploadSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
error: <ErrorOutlineSVGIcon />,
forward: <KeyboardArrowRightSVGIcon />,
Expand Down
8 changes: 6 additions & 2 deletions packages/icon/src/IconProvider.tsx
Expand Up @@ -26,7 +26,11 @@ export interface ConfigurableIcons {
dropdown?: ReactNode;

/**
* The general icon to use for downloading content.
* The general icon to use for the `FileInput` component (normally file
* uploads).
*
* @remarks \@since 4.0.3 Changed the default icon to be `file_upload` and
* this will be renamed to `upload` in the next major release.
*/
download?: ReactNode;

Expand Down Expand Up @@ -89,7 +93,7 @@ export type ConfiguredIcons = Required<ConfigurableIcons>;
const DEFAULT_ICONS: ConfiguredIcons = {
back: <FontIcon>keyboard_arrow_left</FontIcon>,
checkbox: <FontIcon>check_box</FontIcon>,
download: <FontIcon>file_download</FontIcon>,
download: <FontIcon>file_upload</FontIcon>,
dropdown: <FontIcon>arrow_drop_down</FontIcon>,
error: <FontIcon>error_outline</FontIcon>,
expander: <FontIcon>keyboard_arrow_down</FontIcon>,
Expand Down

0 comments on commit 174d1c1

Please sign in to comment.