Last active
July 14, 2020 20:12
-
-
Save conartist6/2eab39097acbcda7450c9538cbdd0768 to your computer and use it in GitHub Desktop.
Built webpackable component example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @macrome | |
* @generated-by ./index.js | |
*/ | |
const React = require('react'); | |
const styles = require('index.module.css.js'); | |
require('index.module.css'); | |
// The bundler needs a css require to exist for static analysis. | |
// Node require hooks may be used to make requiring any .css a no-op. | |
function MyComponent(props) { | |
return React.createElement( | |
'button', | |
{ className: styles.button } | |
' Push me ' | |
); | |
} | |
module.exports = { MyComponent }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @macrome | |
* @generated-by ./index.module.scss | |
*/ | |
._button_116zl_1 { | |
line-height: 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @macrome | |
* @generated-by ./index.module.scss | |
*/ | |
module.exports = { | |
button: "_button_116zl_1" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button { | |
line-height: 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import styles from 'index.module.scss'; | |
export function MyComponent(props) { | |
return <button className={styles.button}> Push me </button>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment