Last active
August 8, 2016 08:20
-
-
Save mmakarin/c35ca9a8dd609c72af73 to your computer and use it in GitHub Desktop.
React component template for Intellij Idea
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 React, { PureComponent, PropTypes } from "react"; | |
import cx from "classnames"; | |
import { baseClass2 as baseClass } from "util/baseClass"; | |
import styles from "./styles.less"; | |
#set( $nameHyphenated = $NAME.replaceAll("(.)([A-Z])", "$1-$2").toLowerCase()) | |
const bc = baseClass("lombardio-ui-$nameHyphenated", styles); | |
export default class $NAME extends PureComponent { | |
static propTypes = { | |
className: PropTypes.string | |
}; | |
render() { | |
const { | |
className, | |
children, | |
...props | |
} = this.props; | |
return ( | |
<div | |
{...props} | |
className={cx(bc(), className)} | |
> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment