Skip to content

Instantly share code, notes, and snippets.

View interaminense's full-sized avatar
🖐️
Hi there!

Adriano Interaminense interaminense

🖐️
Hi there!
View GitHub Profile
@interaminense
interaminense / mathematics-otherprops.js
Created February 28, 2018 04:26
Mathematics OtherProps
{...this.otherProps()}
@interaminense
interaminense / mathematics-render-component-button.js
Created February 28, 2018 04:24
Mathematics Render Component Button
import Component, {Config} from 'metal-jsx';
import getCN from 'classnames';
class Button extends Component {
render() {
const {children, isActive, style} = this.props;
const classes = getCN('mathematics-btn',
{
['mathematics-btn--active']: isActive,
[`mathematics-btn--${style}`]: style
@interaminense
interaminense / mathematics-jsdoc.js
Created February 28, 2018 04:21
Mathematics JSDoc
Button.PROPS = {
/**
* Adds the classname 'mathematics-btn--active'
* to Button
* @type {boolean}
* @default false
*/
isActive: Config.bool().value(false),
/**
@interaminense
interaminense / mathematics-validate-props-oneof.js
Created February 28, 2018 04:20
Mathematics Validate Props oneOf
Button.PROPS = {
style: Config.oneOf(['primary','default']).value('default')
};
@interaminense
interaminense / mathematics-validade-props.js
Created February 28, 2018 04:19
Mathematics Validate Props
Button.PROPS = {
isActive: Config.bool().value(false)
};
@interaminense
interaminense / mathematics-config.js
Created February 28, 2018 04:17
Mathematics Config
import Component, {Config} from 'metal-jsx';
class Button extends Component {}
export default Button;
@interaminense
interaminense / mathematics-component-button.js
Created February 28, 2018 04:16
Mathematics Component Button
<Button isActive style={'primary'} />
@interaminense
interaminense / mathematics-import-metaljsx.js
Created February 28, 2018 04:15
Mathematics Import MetalJSX
import Component from 'metal-jsx';
class Button extends Component {}
export default Button;
@interaminense
interaminense / mathematics-export-components.js
Created February 28, 2018 04:14
Mathematics Export Components
import Button from './Button';
export { Button };
@interaminense
interaminense / mathematics-app.js
Last active February 28, 2018 03:13
Mathematics App
import Component from 'metal-jsx';
import Mathematics from './components/Mathematics';
class App extends Component {
render() {
const {lvlDefault, lvls, showResult, countdown} = this.state;
return (
<Mathematics
countdown={30}