1import React from 'react'
2import PropTypes from 'prop-types';
5const InnerLabelDropdown = props => {
7 const menuVisibility = props.isOpen === true
11 const selectedClasses = props.isOpen === true
16 <div className={'rel table'}>
18 className={`fix full o-0 ${menuVisibility}`}
19 onClick={props.handleClose}
23 className={`h-10 mp-0 bg-white outline-blue sans ${props.className}`}
24 onClick={props.handleToggle}
25 disabled={props.disabled}>
26 <div className={'flex'}>
27 <div className={`ph-4 flex-center-all b-2 br-0 b-solid h-10 ${selectedClasses}`}>
28 <div className={'text-400 mr-2'}>{props.title}</div>
29 <div className={'text-600'}>{props.currentSelectionTitle}</div>
31 <div className={'white bg-blue s-10 flex-center-all text-sm'}>{'▼'}</div>
35 <div className={`abs flex-column bg-white t-12 l-0 w-100 ${menuVisibility}`}>
36 <div className={'pv-1 b-solid b-gray-50 b-2 bb-0'} />
40 <div className={'pv-1 b-solid b-gray-50 b-2 bt-0'} />
47InnerLabelDropdown.propTypes = {
48 disabled: PropTypes.bool,
49 isOpen: PropTypes.bool,
50 handleToggle: PropTypes.func,
51 handleClose: PropTypes.func,
52 className: PropTypes.string,
53 title: PropTypes.string,
54 children: PropTypes.node,
55 style: PropTypes.object,
56 currentSelectionTitle: PropTypes.string,
60InnerLabelDropdown.defaultProps = {
64 currentSelectionTitle: '',
65 handleToggle: () => {},
66 handleClose: () => {},
71export default InnerLabelDropdown
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list