mintlify / components

UI components for documentation made with React and TailwindCSS.
MIT License
79 stars 12 forks source link

Callback when clipboard is clicked on code blocks #47

Closed ghost closed 1 year ago

ghost commented 1 year ago

We want mint to send analytics events when the user copies from a code block.

We need an optional prop on the CodeBlock and CodeGroup component that runs whenever the clipboard is clicked. The event should have name and code as event properties.

ghost commented 1 year ago

We might be able to use Storybook interactions to test the event fires?

NicoZweifel commented 1 year ago

Going to take this one, I'll add Actions/Interactions in storybook.

handotdev commented 1 year ago

@NicoZweifel we just had to do this for #51

NicoZweifel commented 1 year ago

No problem ☺️