New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an example of x-clock with React. #53

Merged
merged 2 commits into from Jan 11, 2016
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+39 −0
Diff settings

Always

Just for now

Copy path View file
@@ -0,0 +1,15 @@

var App = React.createClass({
render: function() {
return (
<div>
<h3>dynamic</h3>
<x-clock>10:10:30</x-clock>
<h3>fixed</h3>
<x-clock hour="10" minute="10" second="30">10:10:30</x-clock>
</div>
)
}
})

ReactDOM.render(<App />, document.body)
Copy path View file
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>x-clock with React</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,minimal-ui">
<!--[if lte IE 9]><script>(function(f){window.setTimeout=f(window.setTimeout);window.setInterval=f(window.setInterval)})(function(f){return function(c,t){var a=[].slice.call(arguments,2);return f(function(){c.apply(this,a)},t)}});</script><![endif]-->
<script src="//cdnjs.cloudflare.com/ajax/libs/dom4/1.5.2/dom4.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/0.3.0/document-register-element.js"></script>
<script src="js/restyle.js"></script>
<!-- x-clock Custom Element -->
<script src="js/x-clock.js"></script>

<!-- React libs from CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>

<!-- x-clock with React -->
<script type="text/babel" src="js/x-clock.react.js"></script>
</head>
<body>
</body>
</html>
ProTip! Use n and p to navigate between commits in a pull request.