fix(netlify-cms-core): remove double focusable elements on profile menu button (#1900)
This commit is contained in:
parent
fe6af1986f
commit
888ae6b053
@ -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 }) => (
|
||||
<AppHeaderAvatar>
|
||||
{imageUrl ? <AvatarImage src={imageUrl} /> : <AvatarPlaceholderIcon type="user" size="large" />}
|
||||
</AppHeaderAvatar>
|
||||
);
|
||||
const Avatar = ({ imageUrl }) =>
|
||||
imageUrl ? <AvatarImage src={imageUrl} /> : <AvatarPlaceholderIcon type="user" size="large" />;
|
||||
|
||||
Avatar.propTypes = {
|
||||
imageUrl: PropTypes.string,
|
||||
@ -60,9 +57,9 @@ const SettingsDropdown = ({ displayUrl, imageUrl, onLogoutClick, t }) => (
|
||||
dropdownWidth="100px"
|
||||
dropdownPosition="right"
|
||||
renderButton={() => (
|
||||
<DropdownButton>
|
||||
<AvatarDropdownButton>
|
||||
<Avatar imageUrl={imageUrl} />
|
||||
</DropdownButton>
|
||||
</AvatarDropdownButton>
|
||||
)}
|
||||
>
|
||||
<DropdownItem label={t('ui.settingsDropdown.logOut')} onClick={onLogoutClick} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user