Skip to content

Instantly share code, notes, and snippets.

@mmakarin
Last active August 8, 2016 08:20
Show Gist options
  • Save mmakarin/c35ca9a8dd609c72af73 to your computer and use it in GitHub Desktop.
Save mmakarin/c35ca9a8dd609c72af73 to your computer and use it in GitHub Desktop.
React component template for Intellij Idea
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