From 888ae6b053e386c39263f03c8c91f3b2d4967fd0 Mon Sep 17 00:00:00 2001 From: Alexander Nanberg Date: Thu, 22 Nov 2018 15:18:11 +0100 Subject: [PATCH] fix(netlify-cms-core): remove double focusable elements on profile menu button (#1900) --- .../src/components/UI/SettingsDropdown.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/netlify-cms-core/src/components/UI/SettingsDropdown.js b/packages/netlify-cms-core/src/components/UI/SettingsDropdown.js index 34b7c611..f7d84a2e 100644 --- a/packages/netlify-cms-core/src/components/UI/SettingsDropdown.js +++ b/packages/netlify-cms-core/src/components/UI/SettingsDropdown.js @@ -12,8 +12,8 @@ const styles = { `, }; -const AppHeaderAvatar = styled.button` - border: 0; +const AvatarDropdownButton = styled(DropdownButton)` + display: inline-block; padding: 8px; cursor: pointer; color: #1e2532; @@ -38,11 +38,8 @@ const AppHeaderSiteLink = styled.a` padding: 10px 16px; `; -const Avatar = ({ imageUrl }) => ( - - {imageUrl ? : } - -); +const Avatar = ({ imageUrl }) => + imageUrl ? : ; Avatar.propTypes = { imageUrl: PropTypes.string, @@ -60,9 +57,9 @@ const SettingsDropdown = ({ displayUrl, imageUrl, onLogoutClick, t }) => ( dropdownWidth="100px" dropdownPosition="right" renderButton={() => ( - + - + )} >