Last active
March 27, 2018 14:55
-
-
Save innabelaya/ee42bfd0237426b84aedca957de2c148 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello World</title> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/prop-types/prop-types.min.js"></script> | |
<script src="https://unpkg.com/bem-react-core@1.0.0-rc.8/umd/react.js"></script> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script> | |
var Button = BemReactCore.decl({ | |
block: 'Button', | |
tag: 'button', | |
attrs: { type: 'submit' } | |
}); | |
BemReactCore.declMod({ disabled: true }, { | |
block: 'Button', | |
attrs: { disabled: 'disabled' } | |
}); | |
ReactDOM.render( | |
React.createElement(Button.applyDecls(), { disabled: true }, 'Тыц меня!'), | |
document.getElementById('root') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment