mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
Better looking checkboxes (#3345)
Also showing icon only on hover on control headers
This commit is contained in:
committed by
GitHub
parent
e79adbbc5f
commit
254645773c
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Checkbox } from 'react-bootstrap';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
const propTypes = {
|
||||
@@ -24,11 +23,16 @@ export default class CheckboxControl extends React.Component {
|
||||
return (
|
||||
<ControlHeader
|
||||
{...this.props}
|
||||
onClick={this.onToggle.bind(this)}
|
||||
leftNode={
|
||||
<Checkbox
|
||||
checked={this.props.value}
|
||||
onChange={this.onToggle.bind(this)}
|
||||
/>
|
||||
<span>
|
||||
<i
|
||||
className={`fa fa-check ${this.props.value ? 'text-primary' : 'text-transparent'}`}
|
||||
onClick={this.onToggle.bind(this)}
|
||||
style={{ border: '1px solid #aaa', borderRadius: '2px', cursor: 'pointer' }}
|
||||
/>
|
||||
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user