From 1a2bb3f6d78228918d32ce2a9710d919af04b64d Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Wed, 1 May 2019 10:10:37 -0700 Subject: [PATCH] improve menu bar tab-navigating --- components/BackgroundSelect.js | 33 ++++++++++++++++----------------- components/Button.js | 14 +++++++++++++- components/Dropdown.js | 3 ++- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/components/BackgroundSelect.js b/components/BackgroundSelect.js index c333fd3..21ffc66 100644 --- a/components/BackgroundSelect.js +++ b/components/BackgroundSelect.js @@ -3,6 +3,7 @@ import colornames from 'colornames' import ImagePicker from './ImagePicker' import ColorPicker from './ColorPicker' +import Button from './Button' import Popout, { managePopout } from './Popout' import { COLORS, DEFAULT_BG_COLOR } from '../lib/constants' import { capitalize, stringifyRGBA } from '../lib/util' @@ -31,12 +32,17 @@ class BackgroundSelect extends React.PureComponent { return (
-
-
-
-
-
-
+ + {}, + onBlur, className = '', background = COLORS.BLACK, color = COLORS.SECONDARY, @@ -21,7 +22,14 @@ const Button = ({ padding = 0, margin = 0 }) => ( - diff --git a/components/Dropdown.js b/components/Dropdown.js index d422242..a00c797 100644 --- a/components/Dropdown.js +++ b/components/Dropdown.js @@ -212,7 +212,8 @@ const SelectedItem = ({ border-radius: ${hasIcon ? '0 3px 3px 0' : '3px'}; outline: none; } - .dropdown-display:hover { + .dropdown-display:hover, + .dropdown-display:focus { background: ${COLORS.HOVER}; }