react icon indicating copy to clipboard operation
react copied to clipboard

`DialogV2` has incorrect names for width values

Open iansan5653 opened this issue 1 year ago • 2 comments

The new Dialog component has a width prop:

https://github.com/primer/react/blob/f9eae58360ebaac9f3ada777e11f954d3013782a/packages/react/src/Dialog/Dialog.tsx#L114-L121

These size names do not match the Primer overlay primitives.

It should be:

  • xsmall: 192px
  • small: 320px
  • medium: 480px
  • large: 640px
  • xlarge: 960px

Currently the only way to make an actual xlarge dialog is to set the width explicitly via sx.

iansan5653 avatar Apr 19 '24 20:04 iansan5653

Thanks @iansan5653 for raising this issue. I liked it to the epic (Staff only link) that we do all the dialog work. Let us know if you have any concern with it 🙌

broccolinisoup avatar Apr 23 '24 01:04 broccolinisoup