Currently this library supports generating snippets which can be copy/pasted. It would be good to open up the "methods" of code exporting to allow things like exporting straight to file.
I would like to introduce an additional opt-in button that when clicked would allow a function passed via a prop to be called. A consuming library can therefore implement this however they please (writing the file to disk, etc), but benefits by allowing this library to render the snippets as usual.
What do you think to this?
Currently this library supports generating snippets which can be copy/pasted. It would be good to open up the "methods" of code exporting to allow things like exporting straight to file.
I would like to introduce an additional opt-in button that when clicked would allow a function passed via a prop to be called. A consuming library can therefore implement this however they please (writing the file to disk, etc), but benefits by allowing this library to render the snippets as usual.
What do you think to this?