-
Notifications
You must be signed in to change notification settings - Fork 186
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
[BpkInfoBanner] Changed typing declarations to match common-types.ts
file
#3094
Conversation
Visit https://backpack.github.io/storybook-prs/3094 to see this build running in a browser. |
export type CommonProps = { | ||
type: AlertTypeValue; | ||
type?: AlertTypeValue; |
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.
This value would always have a value right as we set a default in the Inner Banner should would never need to be optional here and may also need to be updated in the common-types file too?
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 hope I get it right, but won't BpkInfoBanner
complain about typing if we'll remove optional here? I mean, we may not pass to BpkInfoBanner
a type
prop and it should still work and pass typechecking. Since BpkInfoBanner
has CommonProps
as type for props, if we'll make type
required it would fail. According to figma, if I get it right, it has a default value which we specify in BpkInfoBannerInner
, as you mentioned, and type
marked as not required.
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.
Ah yeah you are right my mistake here, apologies!
Visit https://backpack.github.io/storybook-prs/3094 to see this build running in a browser. |
common-types.ts
filecommon-types.ts
file
Changed typing declarations in
common-types.d.ts
to matchcommon-types.ts
Remember to include the following changes:
README.md
(If you have created a new component)README.md