diff --git a/components/BackgroundSelect.js b/components/BackgroundSelect.js index 27e5eb6..f4c798f 100644 --- a/components/BackgroundSelect.js +++ b/components/BackgroundSelect.js @@ -10,12 +10,16 @@ import { parseRGBA, capitalizeFirstLetter } from '../lib/util' class BackgroundSelect extends React.Component { constructor() { super() - this.state = { isVisible: false, selectedTab: 'color' } + this.state = { isVisible: false, selectedTab: 'color', mounted: false } this.toggle = this.toggle.bind(this) this.selectTab = this.selectTab.bind(this) this.handlePickColor = this.handlePickColor.bind(this) } + componentDidMount() { + this.setState({ mounted: true }) + } + toggle() { this.setState({ isVisible: !this.state.isVisible }) } @@ -77,10 +81,12 @@ class BackgroundSelect extends React.Component {
- + {this.state.mounted && ( + + )}
div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div > div:nth-child(1) > div), - .bg-select-pickers :global(.sketch-picker > div:nth-child(2) > div:nth-child(2) > div:nth-child(1)) { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==) - left center !important; - } - .bg-select-pickers :global(.sketch-picker > div:nth-child(3) > div > div > input) { width: 100% !important; box-shadow: none;