Skip to content
Snippets Groups Projects
Commit 44375186 authored by Kyle Doherty's avatar Kyle Doherty
Browse files

replace expand

parent b87e322a
Branches jest-role-hidden
Tags
No related merge requests found
'use strict';
var ExpandIcon = React.createClass({
getDefaultProps: function() {
return {
width: '32',
height: '32',
className: 'Icon-expand',
id: 'expand',
fill: 'currentcolor'
};
},
render: function() {
return (
<svg {... this.props} viewBox="0 0 32 32">
<path d="M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "></path>
</svg>
);
}
});
'use strict';
/*global _, cx, AggregationWidget, FilterWidget, LimitWidget, SortWidget, RunButton, SelectionModule, DatabaseSelector, ExpandIcon*/
/*global _, cx, AggregationWidget, FilterWidget, LimitWidget, SortWidget, RunButton, SelectionModule, DatabaseSelector, Icon*/
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
......@@ -710,7 +710,7 @@ var GuiQueryEditor = React.createClass({
toggleIcon: function () {
if(this.state.isOpen) {
return (
<ExpandIcon width="16px" height="16px" />
<Icon name='expand' width="16px" height="16px" />
);
} else {
return (
......
......@@ -2,25 +2,21 @@
var Icon = React.createClass({
displayName: 'Icon',
propTypes: function () {
},
iconPaths: {
check: 'M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z ',
close: 'M4 8 L8 4 L16 12 L24 4 L28 8 L20 16 L28 24 L24 28 L16 20 L8 28 L4 24 L12 16 z ',
expand: 'M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z ',
},
getDefaultProps: function () {
return {
width: 32,
height: 32,
fill: 'currentcolor',
iconClassName: 'Icon'
fill: 'currentcolor'
};
},
render: function () {
return (
<svg viewBox="0 0 32 32" {... this.props}>
<svg viewBox="0 0 32 32" {... this.props} className={'Icon Icon-' + this.props.name}>
<path d={this.iconPaths[this.props.name]}/>
</svg>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment