Closed daniele-zurico closed 1 year ago
Two new utilities has been created for multiple classes and contional classes in /src/common/utils/classNames.ts
/src/common/utils/classNames.ts
<div className={['a','b'].join(' ')}/>
and the second one instead:
<div className={['a', condition ? 'b' : 'c'].join(' ')]}
the usage will become:
<div className={classNames(['a','b'])}/>
and
<div className={['a', { 'a' : condition, 'b': !condition}]]}
To see one example already implemented goes to /src/formSelect/FormSelect.tsx (line 196)
/src/formSelect/FormSelect.tsx
Scan all the components and when you find conditional classnames or concatenated classNames use the 2 explained functions
Closed by #411
Two new utilities has been created for multiple classes and contional classes in
/src/common/utils/classNames.ts
and the second one instead:
the usage will become:
and
To see one example already implemented goes to
/src/formSelect/FormSelect.tsx
(line 196)Scan all the components and when you find conditional classnames or concatenated classNames use the 2 explained functions