Skip to content

docs: add CenterBaseline to style macro docs#10216

Merged
yihuiliao merged 4 commits into
mainfrom
center-baseline-docs
Jun 17, 2026
Merged

docs: add CenterBaseline to style macro docs#10216
yihuiliao merged 4 commits into
mainfrom
center-baseline-docs

Conversation

@yihuiliao

Copy link
Copy Markdown
Member

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@yihuiliao yihuiliao marked this pull request as ready for review June 17, 2026 00:10
@github-actions github-actions Bot added the S2 label Jun 17, 2026
Comment thread packages/@react-spectrum/s2/src/CenterBaseline.tsx Outdated
typeParameters: obj.typeParameters.map(i => fn(i, 'typeParameters')),
ref: obj.ref ? fn(obj.ref, 'ref') : null,
description: obj.description,
examples: obj.examples,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? did it break? or are we potentially adding more to our docs? i see there are some other @examples floating around

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else on this page has been a function, and this is the first component.

@yihuiliao yihuiliao Jun 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we use those for the other style macro utils (all functions) which pulls from the jsdocs comment @example. i don't see us using @example for any components except for CenterBaseline now so it should be fine. we didn't support it back @example jsdocs comments for components and now this adds support for it.

@rspbot

rspbot commented Jun 17, 2026

Copy link
Copy Markdown

reidbarber
reidbarber previously approved these changes Jun 17, 2026
@rspbot

rspbot commented Jun 17, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jun 17, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/s2

/@react-spectrum/s2:CenterBaseline

+CenterBaseline {
+  children: ReactNode
+  className?: string | undefined
+  id?: string | undefined
+  role?: AriaRole | undefined
+  slot?: string
+  style?: CSSProperties
+  styles?: StyleString
+  tabIndex?: number | undefined
+}

@rspbot

rspbot commented Jun 17, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (4)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/6594757a72537f780eab7a908d93862e8738e75b/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/6594757a72537f780eab7a908d93862e8738e75b/

@yihuiliao yihuiliao added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit cb43c8c Jun 17, 2026
30 checks passed
@yihuiliao yihuiliao deleted the center-baseline-docs branch June 17, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants