We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm working on our UI Library and I want to convert all the components to string so we can shown it as code ready to copy and paste.
We use styled-jsx and we need to convert snippets like this ⬇️ into strings.
<Button type="button" size="md" primary>Save</Button> <style jsx>{` .address{ grid-template-columns: 66% 28%; display: grid; justify-content: space-between; } `}</style>
This is the current output:
<Button primary type="button" > Save </Button> <_class css=".address[data-jsx="2524236662"]{-ms-grid-columns: 66% 28%;grid-template-columns: 66% 28%;display: -ms-grid;display: grid;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;} /*@ sourceURL=components/ui-library/Forms.js */ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9yaWNhcmRvcmF1Y2gvU2l0ZXMvc2NhbGVhcGkuY29tL2Zyb250ZW5kL2NvbXBvbmVudHMvdWktbGlicmFyeS9Gb3Jtcy5qcyIsImNvbXBvbmVudHMvdWktbGlicmFyeS9Gb3Jtcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQ2tCLGdDQUV1QiwwQkFDakIsQUFEaUIsK0JBQ2pCLGtCQUNpQixBQURqQixjQUNpQiwwQkFDaEMsQUFEZ0MsdUJBQ2hDLEFBRGdDLCtCQUNoQyxDQUFBO0FDN0NULCtDQUErQyIsImZpbGUiOiJ0by5jc3MiLCJzb3VyY2VzQ29udGVu0= */" styleId={2524236662} /> </Form>
My code:
let codeForm = reactElementToJSXString( this.props.children, { showDefaultProps: false, filterProps: ['data-jsx'] } );
Thanks for this amazing lib!
The text was updated successfully, but these errors were encountered:
Interesting feature request, no idea how to do it still! :)
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm working on our UI Library and I want to convert all the components to string so we can shown it as code ready to copy and paste.
We use styled-jsx and we need to convert snippets like this ⬇️ into strings.
This is the current output:
My code:
Thanks for this amazing lib!
The text was updated successfully, but these errors were encountered: