Skip to content

Commit 0b1f2f9

Browse files
refactor(client,prospect): use getClassName in CardRadioOptionCommon
1 parent 9b08315 commit 0b1f2f9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

packages/canopee-react/src/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
} from "react";
77
import { BasePicture } from "../../../BasePicture/BasePicture";
88
import type { Icon as IconCommon } from "../../../Icon/IconCommon";
9+
import { getClassName } from "../../../utilities/getClassName";
910
import type { Radio } from "../Radio/RadioCommon";
1011

1112
type BaseCardRadioOptionProps = Omit<ComponentProps<typeof Radio>, "size"> & {
@@ -56,14 +57,14 @@ export const CardRadioOptionCommon = forwardRef<
5657

5758
return (
5859
<label
59-
className={[
60-
"af-card-radio-option",
61-
isInvalid && "af-card-radio-option--invalid",
62-
isCardRadioOptionHorizontal && "af-card-radio-option--horizontal",
60+
className={getClassName({
61+
baseClassName: "af-card-radio-option",
62+
modifiers: [
63+
isInvalid && "invalid",
64+
isCardRadioOptionHorizontal && "horizontal",
65+
],
6366
className,
64-
]
65-
.filter(Boolean)
66-
.join(" ")}
67+
})}
6768
>
6869
{icon ? <IconComponent src={icon} role="presentation" /> : null}
6970
{isCardRadioOptionHorizontal && src ? (

0 commit comments

Comments
 (0)