This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Box): Add new size styleProps (width, height)
Including max/min variants (minHeight, maxHeight, minWidth, maxWidth)
- Loading branch information
1 parent
3c11198
commit 4ab2bc4
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {createStyleFunction} from '../utils/styleProps'; | ||
import {getLength} from '../utils'; | ||
|
||
const sizeProps = createStyleFunction([ | ||
{ | ||
styleProp: 'width', | ||
getValue: getLength, | ||
}, | ||
{ | ||
styleProp: 'maxWidth', | ||
getValue: getLength, | ||
}, | ||
{ | ||
styleProp: 'minWidth', | ||
getValue: getLength, | ||
}, | ||
{ | ||
styleProp: 'height', | ||
getValue: getLength, | ||
}, | ||
{ | ||
styleProp: 'maxHeight', | ||
getValue: getLength, | ||
}, | ||
{ | ||
styleProp: 'minHeight', | ||
getValue: getLength, | ||
}, | ||
]); | ||
|
||
export default sizeProps; |