I’ve created a dropdown component with two variants: expanded and unexpanded. When the user clicks the chevron down icon in the unexpanded variant, it switches to the expanded variant, and clicking the chevron up icon switches it back. I want to use this dropdown in multiple places, each with different options. However, when I change the options in any instance, they revert to the original options defined in the component. How can I retain the customized options in each instance while maintaining the expand/collapse functionality?
This is the component
and these are some of the instances, but after some time, the options get changed to the ones in the original component.
Figma Link:
Figma – 2 Jun 24Thanks in advance for your assistance!