@@ -11,6 +11,7 @@ import {
1111 DialPrimaryButton ,
1212} from './ButtonWrappers' ;
1313import { ElementSize } from '@/types/size' ;
14+ import { DIAL_ICON_SIZE } from '@/constants/icon' ;
1415
1516const meta = {
1617 title : 'DIAL/Elements/Buttons/Button' ,
@@ -200,14 +201,14 @@ export const AllVariants: Story = {
200201 render : ( ) => {
201202 const baseProps : DialButtonProps = {
202203 label : 'Standard' ,
203- iconAfter : < IconArrowRight size = { 20 } /> ,
204- iconBefore : < IconArrowLeft size = { 20 } /> ,
204+ iconAfter : < IconArrowRight size = { DIAL_ICON_SIZE . MD } /> ,
205+ iconBefore : < IconArrowLeft size = { DIAL_ICON_SIZE . MD } /> ,
205206 } ;
206207
207208 const smallProps : DialButtonProps = {
208209 label : 'Small' ,
209- iconAfter : < IconArrowRight size = { 16 } /> ,
210- iconBefore : < IconArrowLeft size = { 16 } /> ,
210+ iconAfter : < IconArrowRight size = { DIAL_ICON_SIZE . SM } /> ,
211+ iconBefore : < IconArrowLeft size = { DIAL_ICON_SIZE . SM } /> ,
211212 size : ElementSize . Small ,
212213 } ;
213214
@@ -299,15 +300,15 @@ export const WithIconsBeforeAfter: Story = {
299300 args : {
300301 label : 'With Icons' ,
301302 variant : ButtonVariant . Primary ,
302- iconBefore : < IconArrowLeft size = { 20 } /> ,
303- iconAfter : < IconArrowRight size = { 20 } /> ,
303+ iconBefore : < IconArrowLeft size = { DIAL_ICON_SIZE . MD } /> ,
304+ iconAfter : < IconArrowRight size = { DIAL_ICON_SIZE . MD } /> ,
304305 } ,
305306} ;
306307
307308export const IconOnlyButton : Story = {
308309 args : {
309310 variant : ButtonVariant . Primary ,
310- iconBefore : < IconArrowRight size = { 20 } /> ,
311+ iconBefore : < IconArrowRight size = { DIAL_ICON_SIZE . MD } /> ,
311312 'aria-label' : 'Next' ,
312313 } ,
313314 parameters : {
@@ -325,8 +326,8 @@ export const HideTitleOnMobile: Story = {
325326 label : 'Hidden on mobile' ,
326327 variant : ButtonVariant . Primary ,
327328 hideTitleOnMobile : true ,
328- iconBefore : < IconArrowLeft size = { 20 } /> ,
329- iconAfter : < IconArrowRight size = { 20 } /> ,
329+ iconBefore : < IconArrowLeft size = { DIAL_ICON_SIZE . MD } /> ,
330+ iconAfter : < IconArrowRight size = { DIAL_ICON_SIZE . MD } /> ,
330331 } ,
331332 parameters : {
332333 docs : {
@@ -366,7 +367,7 @@ export const LinkWrapperButton: Story = {
366367 render : ( args ) => < DialLinkButton { ...args } /> ,
367368 args : {
368369 label : 'Link Button' ,
369- iconAfter : < IconArrowRight size = { 20 } /> ,
370+ iconAfter : < IconArrowRight size = { DIAL_ICON_SIZE . MD } /> ,
370371 } ,
371372 parameters : {
372373 docs : {
@@ -382,7 +383,7 @@ export const GhostWrapperButton: Story = {
382383 render : ( args ) => < DialGhostButton { ...args } /> ,
383384 args : {
384385 label : 'Ghost Button' ,
385- iconBefore : < IconArrowLeft size = { 20 } /> ,
386+ iconBefore : < IconArrowLeft size = { DIAL_ICON_SIZE . MD } /> ,
386387 } ,
387388 parameters : {
388389 docs : {
0 commit comments