File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import React from 'react' ;
8
8
import styled from 'styled-components' ;
9
- import { Dropdown } from '@primer/components' ;
9
+ import { Dropdown , themeGet } from '@primer/components' ;
10
10
import NavHierarchy from '../nav-hierarchy'
11
11
12
12
VariantSelect . Menu = styled ( Dropdown . Menu ) `
13
13
width: ${ props => props . width ? props . width : '160px' } ;
14
14
`
15
15
16
+ VariantSelect . Button = styled ( Dropdown . Button ) `
17
+ &:focus {
18
+ box-shadow: 0 0 0 3px ${ themeGet ( 'colors.blue.5' ) } ;
19
+ }
20
+ `
21
+
16
22
function VariantSelect ( props ) {
17
23
const path = NavHierarchy . getPath ( props . location . pathname ) ;
18
24
const vp = NavHierarchy . getVariantAndPage ( props . root , path ) ;
@@ -95,7 +101,7 @@ function VariantSelect(props) {
95
101
return (
96
102
< div ref = { wrapper } >
97
103
< Dropdown onKeyDown = { onDropDownKeyDown } overlay = { props . overlay } >
98
- < Dropdown . Button > { selectedItem . variant . title } </ Dropdown . Button >
104
+ < VariantSelect . Button > { selectedItem . variant . title } </ VariantSelect . Button >
99
105
< VariantSelect . Menu direction = { props . direction } width = { props . menuWidth } >
100
106
{ items }
101
107
</ VariantSelect . Menu >
You can’t perform that action at this time.
0 commit comments