thomas-lowry / figma-plugin-ds

A small lightweight design system for use in Figma Plugins
MIT License
693 stars 71 forks source link

Interactive elements (like button, switch, etc) inside the disclosure are not clickable #47

Open didoo opened 3 years ago

didoo commented 3 years ago

According to the CSS declaration for .disclosure__content, the content is not clickable https://github.com/thomas-lowry/figma-plugin-ds/blob/a060f663a1f63d14cbc6abd6927c7bb512f1176e/dist/figma-plugin-ds.css#L884

But if a user puts an interactive element (eg. a button, a switch, etc.) inside the "disclosure" component, the interactive element is not clickable. I suggest overwriting the property when the disclose is expanded:

.disclosure--expanded .disclosure__content {
    pointer-events: all;
}

(Happy to open a PR if you think is OK)