Skip to content

Commit

Permalink
Add size prop to IconButton (#20219)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxiadlovskii authored Aug 20, 2024
1 parent 6692a9c commit 87ca9b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions graylog2-web-interface/src/components/common/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';

import Icon from 'components/common/Icon';
import type { IconName, RotateProp, IconType } from 'components/common/Icon';
import type { IconName, RotateProp, IconType, SizeProp } from 'components/common/Icon';

const Wrapper = styled.button<{ disabled: boolean }>(({ theme, disabled }) => css`
display: inline-flex;
Expand Down Expand Up @@ -51,7 +51,8 @@ type Props = {
iconType?: IconType,
disabled?: boolean,
rotation?: RotateProp,
'data-testid'?: string
'data-testid'?: string,
size?: SizeProp,
};

const handleClick = (onClick: () => void | undefined) => {
Expand Down Expand Up @@ -98,6 +99,7 @@ IconButton.defaultProps = {
rotation: undefined,
iconType: undefined,
'data-testid': undefined,
size: undefined,
};

export default IconButton;

0 comments on commit 87ca9b8

Please sign in to comment.