Skip to content
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

Merged
merged 3 commits into from Jun 22, 2023

Conversation

zoosphar
Copy link
Contributor

  • Additional optional id prop added to ErrorMessageProps to make it easily testable in e2e tests.
  • Updated the docs of the section ErrorMessage and added an example to demonstrate this update.
  • Since it doesn't change the functionality, it didn't need to be covered under any test case.

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..

@vercel
Copy link

vercel bot commented Jun 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 10:24pm

@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

⚠️ No Changeset found

Latest commit: 27af0d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 12, 2023

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:

Sandbox Source
Formik TypeScript Playground (forked) Configuration

@@ -4,6 +4,7 @@ import { getIn, isFunction } from './utils';
import { connect } from './connect';

export interface ErrorMessageProps {
id?: string;
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

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?

Copy link
Collaborator

@quantizor quantizor left a comment

Choose a reason for hiding this comment

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

Thank you!

@quantizor quantizor added the automerge automerge label for kodiak label Jun 22, 2023
@kodiakhq kodiakhq bot merged commit 6f1a82e into jaredpalmer:main Jun 22, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge label for kodiak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants