-
Notifications
You must be signed in to change notification settings - Fork 305
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
feat(react): add Placeholder color props #6232
Conversation
🦋 Changeset detectedLatest commit: 6cf5537 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -12,8 +12,13 @@ import { | |||
import { View } from '../View'; | |||
import { primitiveWithForwardRef } from '../utils/primitiveWithForwardRef'; | |||
|
|||
export const CSS_VAR_START_COLOR: string = |
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.
Note: the explicit type declaration here is because csstype deliberately does not recognize CSS variables/custom properties, and they recommend doing either module augmentation or type assertions as a workaround to type errors.
I'm also not too sure about how best to name these constants so feedback/suggestions are welcomed.
b524696
to
6cf5537
Compare
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.
I think this looks good to me. But I would like to see if @calebpollman or @dbanksdesign have thoughts on how the CSS variable is assigned. It seems like it could be cleaner, but I also can't think of a better approach.
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.
LGTM!
Description of changes
startColor
andendColor
props toPlaceholder
component as well as corresponding typesIssue #, if available
Resolves #3958.
Description of how you validated changes
Docs Demo
Docs Example
Checklist
yarn test
passes and tests are updated/addeddocs
,e2e
,examples
, or other private packages.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.