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

refactor(EditTearsheetForm): add Typescript types #5167

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

IgnacioBecerra
Copy link
Contributor

Closes #4283

This PR introduces Typescript types to EditTearsheetForm

What did you change?

Changed the file and component to using Typescript

How did you test and verify your work?

Ran tests and build locally

@IgnacioBecerra IgnacioBecerra requested a review from a team as a code owner May 13, 2024 22:35
@IgnacioBecerra IgnacioBecerra requested review from matthewgallo and amal-k-joy and removed request for a team May 13, 2024 22:35
Copy link

netlify bot commented May 13, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 98d1456
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/664bddfb4d382700094a77b3
😎 Deploy Preview https://deploy-preview-5167--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -19,7 +19,7 @@ const blockClass = `${pkg.prefix}--tearsheet-edit`;
// This is a general context for the forms container
// containing information about the state of the container
// and providing some callback methods for forms to use
export const FormContext = createContext(null);
export const FormContext = (createContext < FormContext) | (null > null);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey,
Can you help me to know the syntax used here? By any chance did you mean to use as below:
export const FormContext = createContext<FormContextType | null>(null);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey Amal, you're right, but I'd like to export the FormContextType from EditTearsheet.tsx, which will be introduced in #5082, wondering if we can get that in first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Typescript types to EditTearsheetForm
3 participants