[MultiSwitch]: Add Icon prop to MultiSwitch component items #768
Answered
by
AlekseyManetov
AlexSKuznetsov
asked this question in
Q&A
-
DescriptionSometimes we need to have a MultiSwitch button not with the Caption text, but just with the icons. (UUI3 Loveship) Describe the solution you'd likeimport IconOne from '.../assets';
import IconTwo from '.../assets';
<MultiSwitch
onValueChange={(newValue) => { ... }}
items={[{"id":1,"icon": IconOne},{"id":2,"icon": IconTwo}]}
value={1}
cx={someClass}
/> |
Beta Was this translation helpful? Give feedback.
Answered by
AlekseyManetov
Oct 13, 2022
Replies: 2 comments
-
Hi, you already can make MultiSwitch with icons - https://codesandbox.io/s/uui-forked-9xpf10?file=/Example.tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AlekseyManetov
-
Hi, cool, thank you. I think I will close this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, you already can make MultiSwitch with icons - https://codesandbox.io/s/uui-forked-9xpf10?file=/Example.tsx