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.
BREAKING CHANGE: `display: block` is no longer automatically applied when using the `overflow` or `textAlign` styling props. Instead, the new `display` prop should be used to give inline elements block-level layout
- Loading branch information
1 parent
a67745a
commit a861038
Showing
6 changed files
with
86 additions
and
46 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
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,21 @@ | ||
const supportedDisplayValues = ['block', 'inline', 'inline-block']; | ||
|
||
function displayProps(props) { | ||
const {display} = props; | ||
|
||
if (!display) return null; | ||
|
||
if (supportedDisplayValues.includes(display)) { | ||
return { | ||
display, | ||
}; | ||
} else { | ||
console.warn( | ||
`Only 'block', 'inline', and 'inline-block' are supported for | ||
the 'display' styling prop. Please use 'base5-ui/Flex' or custom CSS | ||
for more complex styling.` | ||
); | ||
} | ||
} | ||
|
||
export default displayProps; |
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