File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from "react";
22import Select from "react-select" ;
33import PropTypes from "prop-types" ;
44import classNames from "classnames" ;
5+ import { jssTheme } from "styles/theme" ;
56
67UniversalSelect . propTypes = {
78 value : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
@@ -46,6 +47,18 @@ export default function UniversalSelect({
4647 } ) ;
4748 } ;
4849
50+ const setFocusStyle = state => {
51+ return state . isFocused || state . menuIsOpen
52+ ? {
53+ border : `none` ,
54+ outline : `2px solid ${ jssTheme . colors . secondary . linkBlue } `
55+ }
56+ : {
57+ border : `1px solid gray` ,
58+ outline : "none"
59+ } ;
60+ } ;
61+
4962 return (
5063 < Select
5164 className = { classNames ( className ) }
@@ -64,13 +77,9 @@ export default function UniversalSelect({
6477 styles = { {
6578 container : ( provided , state ) => ( {
6679 ...provided ,
67- border :
68- state . isFocused || state . menuIsOpen
69- ? "1px solid black"
70- : "1px solid gray" ,
80+ ...setFocusStyle ( state ) ,
7181 boxShadow :
7282 state . isFocused || state . menuIsOpen ? "none" : provided . boxShadow ,
73- outline : "none" ,
7483 borderRadius : "3px" ,
7584 padding : 0
7685 } ) ,
You can’t perform that action at this time.
0 commit comments