✨(react) add textItems to Field
This allow to add bullet points lists below inputs, the best example is when we want to list multiple errors from form validation. Fixes #147
This commit is contained in:
@@ -13,6 +13,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
||||
{
|
||||
label,
|
||||
text,
|
||||
textItems,
|
||||
state,
|
||||
fullWidth,
|
||||
labelSide = "left",
|
||||
@@ -32,7 +33,13 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
||||
},
|
||||
)}
|
||||
>
|
||||
<Field text={text} compact={true} state={state} fullWidth={fullWidth}>
|
||||
<Field
|
||||
text={text}
|
||||
textItems={textItems}
|
||||
compact={true}
|
||||
state={state}
|
||||
fullWidth={fullWidth}
|
||||
>
|
||||
<div className="c__checkbox__container">
|
||||
{label && <div className="c__checkbox__label">{label}</div>}
|
||||
<div className="c__switch__rail__wrapper">
|
||||
|
||||
Reference in New Issue
Block a user