Skip to content

feat(trial): Reusable banner components #7106

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

Merged
merged 3 commits into from
Nov 6, 2022
Merged

Conversation

tristandubbeld
Copy link
Contributor

@tristandubbeld tristandubbeld commented Nov 3, 2022

Created MessageStripe and Banner components. I've also updated some components to be more flexible and to make sure we don't have to use the same css prop with the same values everytime.

Message Stripe Trial

image

Message Stripe Warning

image

Message Stripe without action

image

Message Stripe with space between

image

Banner
Note: Everett font does not work in Storybook

image

@codesandbox
Copy link

codesandbox bot commented Nov 3, 2022

@linear
Copy link

linear bot commented Nov 3, 2022

XTD-354 Create reusable banner(s) components

Thin banner with CTA (MessageStripe) and bigger banner for dashboard pages with more details

@lbogdan
Copy link
Contributor

lbogdan commented Nov 3, 2022

Build for latest commit 9b6a71d is at https://pr7106.build.csb.dev/s/new.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 3, 2022

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 9b6a71d:

Sandbox Source
Notifications Test Configuration

Copy link
Contributor

@alexnm alexnm left a comment

Choose a reason for hiding this comment

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

💯

<Element
css={{
position: 'relative',
padding: [4, 6, 8],
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a styled-component or a styled-system feature? I thought it only works with the css() function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Styled System! It does only work with the css() function, yes. The Element component uses it to generate the component, so we can pass it with the css prop:

export const Element = styled.div<IElementProps>(props =>
  css({
    // stuff
    ...(props.css || {}),
  })
);

@tristandubbeld tristandubbeld merged commit d2bed73 into master Nov 6, 2022
@tristandubbeld tristandubbeld deleted the tristan/xtd-354 branch November 6, 2022 15:27
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.

4 participants