summaryrefslogtreecommitdiffstats
path: root/src/components/atoms/forms/toggle.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/atoms/forms/toggle.tsx')
-rw-r--r--src/components/atoms/forms/toggle.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/atoms/forms/toggle.tsx b/src/components/atoms/forms/toggle.tsx
index 7ef40ed..c3bc09d 100644
--- a/src/components/atoms/forms/toggle.tsx
+++ b/src/components/atoms/forms/toggle.tsx
@@ -27,6 +27,10 @@ export type ToggleProps = {
*/
label: string;
/**
+ * Set additional classnames to the label.
+ */
+ labelClassName?: string;
+ /**
* The label size.
*/
labelSize?: LabelProps['size'];
@@ -53,6 +57,7 @@ const Toggle: VFC<ToggleProps> = ({
choices,
id,
label,
+ labelClassName = '',
labelSize,
name,
setValue,
@@ -69,7 +74,7 @@ const Toggle: VFC<ToggleProps> = ({
className={styles.checkbox}
/>
<Label size={labelSize} htmlFor={id} className={styles.label}>
- <span className={styles.title}>{label}</span>
+ <span className={`${styles.title} ${labelClassName}`}>{label}</span>
{choices.left}
<span className={styles.toggle}></span>
{choices.right}