You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In a Storybook app, I'd like to be able to run a callback when a user shows or hides a <Figma /> component. It doesn't look like there's a natively supported way to do that right now based on the props?
I can't think of anything, sorry. The Figma component itself could store whether the user has toggled it. But -per the context below- this wouldn't be quite enough for my use case.
Design types
figma
figspec
link
image
iframe
Additional context
This would be useful for sites that want to store whether the Figma embed has been expanded. For example, gamut.codecademy.com today puts very large embeds to emphasize the designs for many components (example: https://gamut.codecademy.com/?path=/docs/atoms-button--cta-button). But non-Codecademy-employees get a file not found on that embed. And even for Codecademy employees, that's a lot of screen real estate. It'd be nice to be able to save the preference if the user saves one.
<#216>
This event callback enables users to save collapsed state and use it for
`defaultCollapsed` property. Having an event for changes is necessary as
the collapsed state is uncontrolled property.
Is your feature request related to a problem? Please describe.
In a Storybook app, I'd like to be able to run a callback when a user shows or hides a
<Figma />
component. It doesn't look like there's a natively supported way to do that right now based on the props?addon-designs/packages/storybook-addon-designs/src/blocks.tsx
Line 59 in 8ff94a0
Describe the solution you'd like
Could we please add a prop like
onToggle
oronShowOrHide
that is called when the Hide/Show button is pressed?Describe alternatives you've considered
I can't think of anything, sorry. The
Figma
component itself could store whether the user has toggled it. But -per the context below- this wouldn't be quite enough for my use case.Design types
figma
figspec
link
image
iframe
Additional context
This would be useful for sites that want to store whether the Figma embed has been expanded. For example, gamut.codecademy.com today puts very large embeds to emphasize the designs for many components (example: https://gamut.codecademy.com/?path=/docs/atoms-button--cta-button). But non-Codecademy-employees get a file not found on that embed. And even for Codecademy employees, that's a lot of screen real estate. It'd be nice to be able to save the preference if the user saves one.
Corresponding Gamut PR: Codecademy/gamut#2795
I'd be happy to send this feature in myself. 🙂
The text was updated successfully, but these errors were encountered: