[styled-system] Add missing margin and padding properties (#42766)

This commit is contained in:
Jeffrey Cherewaty
2020-03-02 14:57:05 -08:00
committed by GitHub
parent f82b261f72
commit 67ab83d478
2 changed files with 9 additions and 2 deletions
+7 -2
View File
@@ -19,6 +19,7 @@
// Nicholas Hehr <https://github.com/HipsterBrown>
// Hammad Jutt <https://github.com/hammadj>
// Dhruv Jain <https://github.com/maddhruv>
// Jeffrey Cherewaty <https://github.com/cherewaty>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
@@ -229,7 +230,9 @@ export interface MarginProps<ThemeType extends Theme = RequiredTheme>
| 'mr'
| 'marginRight'
| 'my'
| 'mx'> {
| 'marginY'
| 'mx'
| 'marginX'> {
}
export interface MarginTopProps<ThemeType extends Theme = RequiredTheme> extends Pick<SpaceProps<ThemeType>, 'mt' | 'marginTop'> {
@@ -263,7 +266,9 @@ export interface PaddingProps<ThemeType extends Theme = RequiredTheme>
| 'pr'
| 'paddingRight'
| 'py'
| 'px'> {
| 'paddingY'
| 'px'
| 'paddingX'> {
}
export interface PaddingTopProps<ThemeType extends Theme = RequiredTheme> extends Pick<SpaceProps<ThemeType>, 'pt' | 'paddingTop'> {
@@ -409,6 +409,8 @@ const test = () => (
<Spacer marginRight={[1, 2, 3]} paddingRight={[1, 2, 3]} />
<Spacer marginTop={[1, 2, 3]} paddingTop={[1, 2, 3]} />
<Spacer marginBottom={[1, 2, 3]} paddingBottom={[1, 2, 3]} />
<Spacer marginX={[1, 2, 3]} paddingX={[1, 2, 3]} />
<Spacer marginY={[1, 2, 3]} paddingY={[1, 2, 3]} />
// overflow
<Box overflow="hidden" />
<Box overflowX="auto" />