Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christophehurpeau/babel-plugin-jsx-code
Replace `<Code>` content to render code side by side with source string
https://github.com/christophehurpeau/babel-plugin-jsx-code
babel-plugin jsx
Last synced: 2 months ago
JSON representation
Replace `<Code>` content to render code side by side with source string
- Host: GitHub
- URL: https://github.com/christophehurpeau/babel-plugin-jsx-code
- Owner: christophehurpeau
- License: isc
- Created: 2017-01-30T18:19:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-10T14:22:07.000Z (3 months ago)
- Last Synced: 2024-10-12T08:31:28.275Z (3 months ago)
- Topics: babel-plugin, jsx
- Language: JavaScript
- Size: 323 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
babel-plugin-jsx-code
Replace `<Code>` content to render code side by side with source string## Usage
```jsx
import Code from 'babel-plugin-jsx-code/Component';const RenderCode = ({ source, result }) => (
{source}
{result}
);export default () => (
A list:
- Green
- Red
)
```Render to:
```html
A list:
<ul>
<li>Green</li>
<li>Red</li>
</ul>
- Green
- Red
```