Skip to content

Commit

Permalink
Adds prop to specify icon dimentions for ActionBarButton
Browse files Browse the repository at this point in the history
  • Loading branch information
samclark2015 committed Feb 20, 2025
1 parent 7356033 commit 3d8163c
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ type ActionBarButtonIconProps = {
readonly iconFontSize?: number;

readonly iconImageSrc?: never;
readonly iconHeight?: never;
readonly iconWidth?: never;
} | {
readonly iconImageSrc?: string;
readonly iconHeight?: number;
readonly iconWidth?: number;

readonly iconId?: never;
readonly iconFontSize?: never;
Expand Down Expand Up @@ -109,8 +113,8 @@ export const ActionBarButton = forwardRef<
<img
src={props.iconImageSrc}
style={{
height: 16,
width: 16
height: props.iconHeight ?? 16,
width: props.iconWidth ?? 16
}}
/>
</div>
Expand Down

0 comments on commit 3d8163c

Please sign in to comment.