Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Color } from '../colors';
import { Icon, IconName } from '../icons';
import * as React from 'react';
import { getSpace, SpaceSize } from '../space';
import styled from 'styled-components';
const ReactSelect = require('react-select').default;
const StyledChevron = styled(Icon).attrs({ name: IconName.ArrowFillRight })`
color: ${Color.Black};
fill: ${Color.Grey60};
width: 12px;
height: 12px;
padding: ${getSpace(SpaceSize.XS) + getSpace(SpaceSize.XXS)}px;
transform: rotate(90deg);
transform: rotate(90deg);
`;
// tslint:disable-next-line:no-empty
const NOOP = () => {};
export const ChevronIcon: React.SFC = props => ;
const Select = React.memo(({
value = null,
label = null,
options = [],
disabled = false,
onSetValue = defaultOnSetValue
} = {}) => {
const callbackRef = useRef(onSetValue)
useEffect(() => {
callbackRef.current = onSetValue
}, [onSetValue])
return h([ReactSelect.default, {
options,
value,
placeholder: label,
onChange: callbackRef.current,
isDisabled: disabled,
//menuIsOpen: true,// useful to debug
isSearchable: false,
menuPlacement: 'auto',
menuPosition: 'fixed',
className: 'select',
classNamePrefix: 'select'
}])
})
getReactSelect() {
const creator = require('react-select');
return creator.default ? creator.default : creator;
}
const { Component } = require('react')
const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const genAccountLink = require('../../../../lib/account-link.js')
const Select = require('react-select').default
import Button from '../../../components/ui/button'
class AccountList extends Component {
getHdPaths () {
return [
{
label: `Ledger Live`,
value: `m/44'/60'/0'/0/0`,
},
{
label: `Legacy (MEW / MyCrypto)`,
value: `m/44'/60'/0'`,
},
]
}
const { createElement } = require('react')
const DOM = require('react-dom-factories')
const Select = require('react-select').default
const PropTypes = require('prop-types')
const { div } = DOM
const Search = ({
items,
left,
top,
onSearch,
searchValue,
width
}) =>
div({ className: 'search box', style: { left, top, width } },
createElement(Select, {
autoFocus: true,
onChange: (option) => option && onSearch(option.value),
filterOptions: (options, filterValue, excludeOptions, props) => {
value: function getReactSelect() {
var creator = require('react-select');
return creator.default ? creator.default : creator;
}
}, {
const React = require('react');
const { _ } = require('lib/locale.js');
const { themeStyle } = require('../theme.js');
const { time } = require('lib/time-utils.js');
const Datetime = require('react-datetime');
const CreatableSelect = require('react-select/lib/Creatable').default;
const Select = require('react-select').default;
const makeAnimated = require('react-select/lib/animated').default;
class PromptDialog extends React.Component {
constructor() {
super();
this.answerInput_ = React.createRef();
}
componentWillMount() {
this.setState({
visible: false,
answer: this.props.defaultValue ? this.props.defaultValue : '',
});
this.focusInput_ = true;
}