use React Toolbox Switch for rte mode selection

This commit is contained in:
Shawn Erquhart 2017-04-18 13:05:21 -04:00
parent 1a12c6f5aa
commit a3b487aaeb
2 changed files with 5 additions and 10 deletions

View File

@ -7,11 +7,7 @@
.Toggle {
float: right;
& button {
font-size: 12px;
text-transform: uppercase;
padding-top: 10px;
padding-bottom: 8px;
}
margin-bottom: 0;
padding-top: 4px;
padding-right: 10px;
}

View File

@ -1,5 +1,6 @@
import React, { PropTypes } from 'react';
import { List } from 'immutable';
import Switch from 'react-toolbox/lib/switch';
import ToolbarButton from './ToolbarButton';
import ToolbarPluginForm from './ToolbarPluginForm';
import { Icon } from '../../../UI';
@ -81,9 +82,7 @@ export default class Toolbar extends React.Component {
getAsset={getAsset}
/>
}
<div className={styles.Toggle}>
<ToolbarButton label="Toggle Markdown" action={onToggleMode} active={rawMode}/>
</div>
<Switch label="Markdown" onChange={onToggleMode} checked={rawMode} className={styles.Toggle}/>
</div>
);
}