mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
fix: remove button nesting (#3100)
This commit is contained in:
parent
eb4ae99f84
commit
958ba79256
@ -3,7 +3,10 @@ import PropTypes from 'prop-types';
|
||||
|
||||
class DropdownButton extends PureComponent {
|
||||
render() {
|
||||
const { children, ...props } = this.props;
|
||||
const { children, noWrap, ...props } = this.props;
|
||||
if (noWrap) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
return (
|
||||
<button type="button" {...props}>
|
||||
{children}
|
||||
@ -14,6 +17,7 @@ class DropdownButton extends PureComponent {
|
||||
|
||||
DropdownButton.propTypes = {
|
||||
children: PropTypes.node,
|
||||
noWrap: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default DropdownButton;
|
||||
|
@ -27,7 +27,7 @@ const StyledIconContainer = styled.div`
|
||||
const AccountDropdown = ({ className }: Props) => (
|
||||
<div className={className}>
|
||||
<Dropdown>
|
||||
<DropdownButton>
|
||||
<DropdownButton noWrap>
|
||||
<Tooltip delay={1000} position="bottom" message="Account">
|
||||
<CircleButton>
|
||||
<SvgIcon icon="user" />
|
||||
|
Loading…
Reference in New Issue
Block a user