diff --git a/modules/react/button/lib/parts/ButtonLabelIcon.tsx b/modules/react/button/lib/parts/ButtonLabelIcon.tsx index 7de4509f94..fd322a1b6c 100644 --- a/modules/react/button/lib/parts/ButtonLabelIcon.tsx +++ b/modules/react/button/lib/parts/ButtonLabelIcon.tsx @@ -2,6 +2,7 @@ import React from 'react'; import {ButtonSizes} from '../types'; import {createComponent} from '@workday/canvas-kit-react/common'; import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon'; +import {px2rem} from '@workday/canvas-kit-styling'; export interface ButtonLabelIconProps extends Partial { /** @@ -42,8 +43,8 @@ export const ButtonLabelIcon = createComponent('span')({ size={iconSize} icon={icon} shouldMirror={shouldMirrorIcon} - width={size ? iconSizes[size] : iconSizes.large} - height={size ? iconSizes[size] : iconSizes.large} + width={px2rem(iconSize)} + height={px2rem(iconSize)} display="inline-block" {...elemProps} /> diff --git a/modules/react/button/stories/button/examples/Primary.tsx b/modules/react/button/stories/button/examples/Primary.tsx index 37328052a1..f7597c68d0 100644 --- a/modules/react/button/stories/button/examples/Primary.tsx +++ b/modules/react/button/stories/button/examples/Primary.tsx @@ -24,6 +24,6 @@ export const Primary = () => ( Primary - + );