|
6 | 6 | VALUE_STATE_SUCCESS,
|
7 | 7 | VALUE_STATE_WARNING
|
8 | 8 | } from '@ui5/webcomponents/dist/generated/i18n/i18n-defaults.js';
|
| 9 | +import IconMode from '@ui5/webcomponents/dist/types/IconMode.js'; |
9 | 10 | import ValueState from '@ui5/webcomponents-base/dist/types/ValueState.js';
|
10 | 11 | import alertIcon from '@ui5/webcomponents-icons/dist/alert.js';
|
11 | 12 | import errorIcon from '@ui5/webcomponents-icons/dist/error.js';
|
@@ -40,7 +41,7 @@ export interface ObjectStatusPropTypes extends CommonProps {
|
40 | 41 | /**
|
41 | 42 | * Defines the icon in front of the `ObjectStatus` text.
|
42 | 43 | *
|
43 |
| - * __Note:__ Although this slot accepts HTML Elements, it is strongly recommended that you only use `Icon` in order to preserve the intended design. |
| 44 | + * __Note:__ Although this slot accepts HTML Elements, it is strongly recommended that you only use the `Icon` component with `mode="Decorative"` in order to preserve the intended design. |
44 | 45 | */
|
45 | 46 | icon?: ReactNode;
|
46 | 47 |
|
@@ -117,31 +118,33 @@ const getStateSpecifics = (state, showDefaultIcon, userIcon, stateAnnouncementTe
|
117 | 118 | switch (state) {
|
118 | 119 | case ValueState.Negative:
|
119 | 120 | if (renderDefaultIcon) {
|
120 |
| - icon = <Icon name={errorIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />; |
| 121 | + icon = <Icon name={errorIcon} data-component-name="ObjectStatusDefaultIcon" mode={IconMode.Decorative} />; |
121 | 122 | }
|
122 | 123 | if (!invisibleText) {
|
123 | 124 | invisibleText = errorStateText;
|
124 | 125 | }
|
125 | 126 | break;
|
126 | 127 | case ValueState.Positive:
|
127 | 128 | if (renderDefaultIcon) {
|
128 |
| - icon = <Icon name={successIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />; |
| 129 | + icon = <Icon name={successIcon} data-component-name="ObjectStatusDefaultIcon" mode={IconMode.Decorative} />; |
129 | 130 | }
|
130 | 131 | if (!invisibleText) {
|
131 | 132 | invisibleText = successStateText;
|
132 | 133 | }
|
133 | 134 | break;
|
134 | 135 | case ValueState.Critical:
|
135 | 136 | if (renderDefaultIcon) {
|
136 |
| - icon = <Icon name={alertIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />; |
| 137 | + icon = <Icon name={alertIcon} data-component-name="ObjectStatusDefaultIcon" mode={IconMode.Decorative} />; |
137 | 138 | }
|
138 | 139 | if (!invisibleText) {
|
139 | 140 | invisibleText = warningStateText;
|
140 | 141 | }
|
141 | 142 | break;
|
142 | 143 | case ValueState.Information:
|
143 | 144 | if (renderDefaultIcon) {
|
144 |
| - icon = <Icon name={informationIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />; |
| 145 | + icon = ( |
| 146 | + <Icon name={informationIcon} data-component-name="ObjectStatusDefaultIcon" mode={IconMode.Decorative} /> |
| 147 | + ); |
145 | 148 | }
|
146 | 149 | if (!invisibleText) {
|
147 | 150 | invisibleText = informationStateText;
|
|
0 commit comments