-
Notifications
You must be signed in to change notification settings - Fork 831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for list heading #4544
Conversation
Valid values for ListHeading's `maxLines` prop are 1 and 2. When the provided value is invalid, fallback to a value of 1, and console.warn the user.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/uber-ui-platform/baseweb/2LMXohuVrbQX4qJUpAJ2gP2RagTU |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e2d00f7:
|
src/list/list-heading.js
Outdated
@@ -78,6 +82,9 @@ const ListHeading = React.forwardRef<HeadingPropsT, HTMLLIElement>( | |||
'endEnhancerDescription will not be rendered if endEnhancer is not a string', | |||
); | |||
} | |||
if (maxLines && !isMaxLinesValid(maxLines)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we wrap this is a __DEV__
if statement, maybe do the same for isEndEnhancerString
check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks.
Description
Extend the docs page for
list
to includeListHeading
.