Skip to content

Commit b7eb4d5

Browse files
committed
feat(apollo,look&feel): commit pour lajout des mdx et refacto de code
1 parent 8cd1e2b commit b7eb4d5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

client/apollo/react/src/Form/ItemFile/ItemStateIcon.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import classNames from "classnames";
2-
31
import type { ComponentType, ComponentProps } from "react";
42

53
import validationIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
64
import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
5+
import { getComponentClassName } from "../../utilities/getComponentClassName";
76
import type { IconProps } from "../../Icon/IconCommon";
87
import { Spinner } from "../../Spinner/SpinnerCommon";
98
import { ItemFileState } from "./ItemFileCommon";
@@ -19,12 +18,15 @@ const ItemStateIcon = ({
1918
ItemIconComponent,
2019
ItemSpinnerComponent,
2120
}: ItemStateIconProps) => {
22-
const classname = classNames("af-icon", `af-icon__${state}`);
21+
const componentClassName = getComponentClassName(
22+
"af-icon",
23+
`af-icon__${state}`,
24+
);
2325
return state === "loading" ? (
2426
<ItemSpinnerComponent size={24} className="af-item-file__spinner" />
2527
) : (
2628
<ItemIconComponent
27-
className={classname}
29+
className={componentClassName}
2830
size="S"
2931
src={state === "success" ? validationIcon : errorIcon}
3032
/>

0 commit comments

Comments
 (0)