Add textAlign to Paragraph and improve JSDoc#4455
Conversation
🚨🚨🚨 Docs migration in progress 🚨🚨🚨We are actively migrating UI extension reference docs to MDX in the
During this migration, please be aware of the following:
Doc comments in Examples that previously lived in this repo are being moved to the What should I do?
Thanks for your patience while we complete the migration! 🙏 |
03729b2 to
1b9765e
Compare
| * @default 'paragraph' | ||
| * @default 'auto' | ||
| */ | ||
| type?: Extract<ParagraphProps$1['type'], 'paragraph' | 'small'>; |
There was a problem hiding this comment.
No, it was just redundant to the 'type' on 'ParagraphProps'
There was a problem hiding this comment.
ah cool. how did you generate those? Did the script remove the duplicate or did you do this manually?
There was a problem hiding this comment.
I generated via pnpm build:components in checkout-web and copied over this .d.ts file
There was a problem hiding this comment.
I'm assuming the docs will still pick all those up, eh?
There was a problem hiding this comment.
I hope so? how can we be sure?
Replace the 'type' prop with 'textAlign' on ParagraphElementProps
to align with the underlying s-paragraph web component change.
- Add textAlign prop ('start' | 'end' | 'center' | 'auto')
- Remove type prop ('paragraph' | 'small')
- Add @publicdocs annotations
- Improve JSDoc for BaseElementProps and BaseElementPropsWithChildren
1b9765e to
fe62c86
Compare
TLDR
Add
textAligntoParagraphElementPropsand replace thetypeprop, aligning ui-extensions types with the underlying component change.What changed
textAlignprop ('start' | 'end' | 'center' | 'auto') toParagraphElementPropstypeprop ('paragraph' | 'small')@publicDocsannotations toParagraphElementandParagraphPropsBaseElementProps,BaseElementPropsWithChildren, and their propertiesContext
The underlying
s-paragraphweb component change shipped in https://github.com/shop/world/pull/577805, which wiredtextAlignthrough the Polaris web component pipeline. This PR updates the ui-extensions type declarations to match.