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

More control over padding of Box component #1962

Open
seahindeniz opened this issue Nov 24, 2020 · 2 comments
Open

More control over padding of Box component #1962

seahindeniz opened this issue Nov 24, 2020 · 2 comments

Comments

@seahindeniz
Copy link
Contributor

Hi

Box component has padding modifiers but each side/angle can have the same padding
image

Is it possible/suitable for adding additional modifiers to have different paddings on horizontal and vertical angles?
Something like:

type PaddingType = "xxs" | "xs" | "s" | "m" | "l" | "xl";

export type BoxPropsType = {
  paddingY?: PaddingType;
  paddingX?: PaddingType;
  padding?: PaddingType;
};

Props can be separated with union types but I'm not sure that fits with the storybook.

@coderitual
Copy link
Contributor

Hey @seahindeniz, this is definitely something on our radar. Before that happens we are going to introduce utility classes based on our design system for usage in app layer. This hopefully will help fixing such issues for existing components. Once we have utility approach in place and properly tested we gonna take care of layout components (like mentioned box) to make them more flexible in terms of spacing related props.

@seahindeniz
Copy link
Contributor Author

Thanks, looking forward to it ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants