brainly / brainly/style-guide

More control over padding of Box component

Open
#1,962 2 comments 0 reactions 0 assignees View on GitHub
Type: Feature Request
Dominant language
TypeScript
Stars
165
Forks
31
PR merge metrics
No merged PRs in 30d

Description

Hi

Box component has padding modifiers but each side/angle can have the same padding
![image](https://user-images.githubusercontent.com/5789670/100114100-1ea9c200-2e82-11eb-8475-5061905acf4f.png)

Is it possible/suitable for adding additional modifiers to have different paddings on horizontal and vertical angles?
Something like:
```ts
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.