react-icons/go#GoUnfold JavaScript Examples

The following examples show how to use react-icons/go#GoUnfold. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Region.js    From covid19 with MIT License 5 votes vote down vote up
render() {
        const { isOpen, value, countryOnly } = this.state
        if (this.props.data == null) return

        const MoreIcon = countryOnly ? GoUnfold : GoFold

        return (
            <div className="current-region-wrap">
                <RegionDropdown
                    isOpen={isOpen}
                    onClose={this.toggleOpen}
                    target={
                        <div className="current-region" onClick={this.toggleOpen}>
                            <div
                                data-tip={this.displayRegionName()}
                                data-tip-disable={this.showTooltip()}
                                data-place={'bottom'}
                            >
                                {this.displayRegionName()}
                            </div>
                            <GoSearch size={18} className="dropdown-arrow" style={{ transform: 'translateY(1px)' }} />
                        </div>
                    }
                >
                    <Select
                        classNamePrefix={'region-select'}
                        autoFocus
                        backspaceRemovesValue={false}
                        components={{
                            DropdownIndicator: () => (
                                <span
                                    className="region-select-more"
                                    onMouseUp={this.toggleCountryOnly}
                                    onTouchEnd={this.toggleCountryOnly}
                                    onMouseEnter={() => this.props.ReactTooltip.show(this.regionSelectMore)}
                                    onMouseLeave={() => this.props.ReactTooltip.hide(this.regionSelectMore)}
                                    ref={(ref) => (this.regionSelectMore = ref)}
                                    data-tip={
                                        countryOnly ? (
                                            i18n.MORE_REGIONS_HELP_TEXT[this.props.lang]
                                        ) : (
                                            i18n.LESS_REGIONS_HELP_TEXT[this.props.lang]
                                        )
                                    }
                                >
                                    <MoreIcon
                                        size={16}
                                        color={
                                            this.props.darkMode ? 'var(--primary-color-4)' : 'var(--primary-color-5)'
                                        }
                                    />
                                </span>
                            ),
                            IndicatorSeparator: null
                        }}
                        controlShouldRenderValue={false}
                        hideSelectedOptions={false}
                        isClearable={false}
                        menuIsOpen
                        onChange={this.onSelectChange}
                        options={this.state.options}
                        placeholder={`${i18n.SEARCH[this.props.lang]} ...... `}
                        styles={this.props.darkMode ? selectStylesDark : selectStyles}
                        tabSelectsValue={false}
                        value={value}
                        noOptionsMessage={() => i18n.NO_RESULT[this.props.lang]}
                    />
                </RegionDropdown>
                <div className="current-date">{this.displayDate()}</div>
            </div>
        )
    }