react-toolbox/spec/components/button.js

46 lines
1.7 KiB
JavaScript
Raw Normal View History

import React from 'react';
2015-11-26 03:53:42 +03:00
import GithubIcon from './github_icon';
2015-11-24 02:29:02 +03:00
import { Button, IconButton } from '../../components/button';
2015-09-21 11:01:52 +03:00
const ButtonTest = () => (
<section>
<h5>Buttons</h5>
<p>lorem ipsum...</p>
<Button href='http://github.com/javivelasco' target='_blank' raised>
<GithubIcon /> Github
</Button>
2016-04-12 22:41:28 +03:00
<Button icon='bookmark' label='Bookmark' accent onRippleEnded={rippleEnded} />
2016-08-06 15:24:40 +03:00
<Button icon='bookmark' label='Bookmark' raised primary rippleMultiple={false} onRippleEnded={rippleEnded} />
<Button icon='inbox' label='Inbox' flat />
<Button icon='add' floating />
<Button icon='add' floating primary />
<Button icon='add' floating primary disabled />
<Button icon='add' floating accent mini />
2015-11-24 02:29:02 +03:00
<IconButton icon='favorite' accent />
2015-11-25 00:18:00 +03:00
<IconButton icon='favorite' inverse />
<IconButton icon='favorite' />
<IconButton icon='favorite' disabled />
2015-11-29 14:39:55 +03:00
<IconButton primary><GithubIcon/></IconButton>
<Button icon='add' label='Add this' flat primary />
<Button icon='add' label='Add this' flat disabled />
<h5>Icon Button Alignment</h5>
<p>
Icon Buttons should align in the vertical center, to see this we need to
put them next to text or highlight thier background color.
</p>
2016-09-03 13:23:22 +03:00
<IconButton icon='menu' style={{backgroundColor: 'red'}} inverse />
<span style={{verticalAlign: 'middle'}}>Menu</span>
<IconButton icon='menu' />
2016-09-03 13:23:22 +03:00
<span style={{verticalAlign: 'middle'}}>Menu</span>
<IconButton><GithubIcon /></IconButton>
2016-09-03 13:23:22 +03:00
<span style={{verticalAlign: 'middle'}}>Github</span>
</section>
);
2015-09-21 11:01:52 +03:00
2016-04-12 22:41:28 +03:00
function rippleEnded () {
console.log('Ripple animation ended!');
}
export default ButtonTest;