From 87ca9b8836bec540bb58664245c1f7953a536f45 Mon Sep 17 00:00:00 2001 From: maxiadlovskii Date: Tue, 20 Aug 2024 10:08:51 +0200 Subject: [PATCH] Add size prop to IconButton (#20219) --- graylog2-web-interface/src/components/common/IconButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/graylog2-web-interface/src/components/common/IconButton.tsx b/graylog2-web-interface/src/components/common/IconButton.tsx index a9b2a0918b0f..76b5e0b265cb 100644 --- a/graylog2-web-interface/src/components/common/IconButton.tsx +++ b/graylog2-web-interface/src/components/common/IconButton.tsx @@ -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; @@ -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) => { @@ -98,6 +99,7 @@ IconButton.defaultProps = { rotation: undefined, iconType: undefined, 'data-testid': undefined, + size: undefined, }; export default IconButton;