-
Notifications
You must be signed in to change notification settings - Fork 130
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
Component roadmap #469
Comments
Is this the moment for us to also cleanup the default margin from some of our components? Such as the |
This could be the time. We should do some research on how other component libraries handle this and have a separate discussion about it. I have an idea on how to apply spacing using Emotion 10's // @sumup/circuit-ui/src/styles/shared.js
import { css } from '@emotion/core';
const spacing = (theme, size = 'kilo', direction = 'bottom') => css`
margin-${direction}: ${theme.spacings[size]};
`;
// app/src/components/ButtonWithMargin.js
import { css } from '@emotion/core';
import styled from '@emotion/styled';
import { Button, sharedStyles } from '@sumup/circuit-ui';
const ButtonWithMargin = props => (
<Button css={theme => sharedStyles.spacing(theme)}>Example</Button>
);
// or
const buttonStyles = ({ theme }) => css`
sharedStyles.spacing(theme);
color: red;
`;
const StyledButton = styled(Button)(buttonStyles); Essentially, the "mixins" would be a way to apply shared styles without needing additional elements, such as |
I was thinking about providing actually both. We need to extend |
Ah, interesting thought! 👍 I'm gonna schedule a roadmap meeting for Circuit UI soon, let's continue the discussion then. |
This issue has been superseded by the other issues mentioned above. |
Based on an internal document which should be treated as the source of truth.
Deprecated
These components will likely be removed in the next major version.
as
propreact-text-mask
Under review
These components are stable, but might have breaking changes in the next major version.
Experimental
These components are not stable and will likely have breaking changes in the next major version.
The text was updated successfully, but these errors were encountered: