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
FEATURE: Add optional Id prop on ErrorMessageProps type #3825
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
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 27af0d4:
|
@@ -4,6 +4,7 @@ import { getIn, isFunction } from './utils'; | |||
import { connect } from './connect'; | |||
|
|||
export interface ErrorMessageProps { | |||
id?: 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.
Should we just allow all typical div
attributes and pull off our specific ones during render?
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.
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.
export interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {
component?: string | React.ComponentType;
children?: (errorMessage: string) => React.ReactNode;
name: string;
render?: (errorMessage: string) => React.ReactNode;
}
Not sure if there's a native-specific version of this?
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.
Thank you!
id
prop added toErrorMessageProps
to make it easily testable in e2e tests.NOTE: This change won't affect any functionalities and since it is an optional param, it can be omitted if not needed.
This is my first contribution to this project, please let me know if I missed something..