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

Pass the rest of the props in Banner component #192

Open
MonPote opened this issue Aug 6, 2020 · 0 comments
Open

Pass the rest of the props in Banner component #192

MonPote opened this issue Aug 6, 2020 · 0 comments
Labels
debt technical debt priority:medium Medium priority issues, should only be postponed if no other option

Comments

@MonPote
Copy link
Contributor

MonPote commented Aug 6, 2020

Component: Banner

Why this is needed: It is need because we might need to add some props directly to the Banner component (Cypress or styles for example)

What should be done:
Just add a {...rest} should be enough.

Implementation proposal (strongly recommended):

function Banner({ icon, title, children, variant, ...rest }: Props) {
  return (
-    <BannerContainer className="sc-banner" variant={variant}>
+    <BannerContainer className="sc-banner" variant={variant} {...rest}>
      {icon}
      <TextContainer>
        {title && <Title>{title}</Title>}
        <Text>{children}</Text>
      </TextContainer>
    </BannerContainer>
  );
}

Test plan:
Update the snapshot.

@thomasdanan thomasdanan added debt technical debt priority:medium Medium priority issues, should only be postponed if no other option labels Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt technical debt priority:medium Medium priority issues, should only be postponed if no other option
Projects
None yet
Development

No branches or pull requests

2 participants