88
99import { FontIcon } from "./FontIcon" ;
1010
11+ /**
12+ * @remarks \@since 5.0.0 The `download` icon has been renamed to `upload`.
13+ */
1114export interface ConfigurableIcons {
1215 /**
1316 * The general icon for navigating backwards or closing an item to the left.
@@ -25,15 +28,6 @@ export interface ConfigurableIcons {
2528 */
2629 dropdown ?: ReactNode ;
2730
28- /**
29- * The general icon to use for the `FileInput` component (normally file
30- * uploads).
31- *
32- * @remarks \@since 4.0.3 Changed the default icon to be `file_upload` and
33- * this will be renamed to `upload` in the next major release.
34- */
35- download ?: ReactNode ;
36-
3731 /**
3832 * The general icon to use when there are form errors.
3933 *
@@ -86,14 +80,22 @@ export interface ConfigurableIcons {
8680 * behavior.
8781 */
8882 sort ?: ReactNode ;
83+
84+ /**
85+ * The general icon to use for the `FileInput` component (normally file
86+ * uploads).
87+ *
88+ * @remarks \@since 5.0.0
89+ */
90+ upload ?: ReactNode ;
8991}
9092
9193export type ConfiguredIcons = Required < ConfigurableIcons > ;
9294
9395const DEFAULT_ICONS : ConfiguredIcons = {
9496 back : < FontIcon > keyboard_arrow_left</ FontIcon > ,
9597 checkbox : < FontIcon > check_box</ FontIcon > ,
96- download : < FontIcon > file_upload</ FontIcon > ,
98+ upload : < FontIcon > file_upload</ FontIcon > ,
9799 dropdown : < FontIcon > arrow_drop_down</ FontIcon > ,
98100 error : < FontIcon > error_outline</ FontIcon > ,
99101 expander : < FontIcon > keyboard_arrow_down</ FontIcon > ,
@@ -153,7 +155,6 @@ export function IconProvider({
153155 children,
154156 back = DEFAULT_ICONS . back ,
155157 checkbox = DEFAULT_ICONS . checkbox ,
156- download = DEFAULT_ICONS . download ,
157158 dropdown = DEFAULT_ICONS . dropdown ,
158159 expander = DEFAULT_ICONS . expander ,
159160 error = DEFAULT_ICONS . error ,
@@ -164,12 +165,12 @@ export function IconProvider({
164165 radio = DEFAULT_ICONS . radio ,
165166 selected = DEFAULT_ICONS . selected ,
166167 sort = DEFAULT_ICONS . sort ,
168+ upload = DEFAULT_ICONS . upload ,
167169} : IconProviderProps ) : ReactElement {
168- const value = useMemo (
170+ const value = useMemo < ConfiguredIcons > (
169171 ( ) => ( {
170172 back,
171173 checkbox,
172- download,
173174 dropdown,
174175 error,
175176 expander,
@@ -180,11 +181,11 @@ export function IconProvider({
180181 radio,
181182 selected,
182183 sort,
184+ upload,
183185 } ) ,
184186 [
185187 back ,
186188 checkbox ,
187- download ,
188189 dropdown ,
189190 error ,
190191 expander ,
@@ -195,6 +196,7 @@ export function IconProvider({
195196 radio ,
196197 selected ,
197198 sort ,
199+ upload ,
198200 ]
199201 ) ;
200202
0 commit comments