-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
|
XTD-354 Create reusable banner(s) components
Thin banner with CTA (MessageStripe) and bigger banner for dashboard pages with more details |
Build for latest commit 9b6a71d is at https://pr7106.build.csb.dev/s/new. |
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:
|
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.
💯
<Element | ||
css={{ | ||
position: 'relative', | ||
padding: [4, 6, 8], |
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.
is this a styled-component or a styled-system feature? I thought it only works with the css() function
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.
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 || {}),
})
);
Created
MessageStripe
andBanner
components. I've also updated some components to be more flexible and to make sure we don't have to use the samecss
prop with the same values everytime.Message Stripe Trial
Message Stripe Warning
Message Stripe without action
Message Stripe with space between
Banner
Note: Everett font does not work in Storybook