-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BC: Make
LayoutCenter
more generic: call it simply Center
and sto…
…p it from taking up 100 % of viewport height (#143) It's now necessary to set the desired height on the parent of the `Center` layout, eg. when you're using `Login` screen component which is expected to spread over entire viewport.
- Loading branch information
1 parent
9f36a41
commit 9b324ac
Showing
9 changed files
with
54 additions
and
42 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
10 changes: 5 additions & 5 deletions
10
...ents/layout/LayoutCenter/LayoutCenter.jsx → src/lib/components/layout/Center/Center.jsx
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import styles from './LayoutCenter.scss'; | ||
import styles from './Center.scss'; | ||
|
||
const LayoutCenter = (props) => ( | ||
export const Center = (props) => ( | ||
<div className={styles.root}> | ||
<div> | ||
{props.children} | ||
</div> | ||
</div> | ||
); | ||
|
||
LayoutCenter.defaultProps = { | ||
Center.defaultProps = { | ||
children: null, | ||
}; | ||
|
||
LayoutCenter.propTypes = { | ||
Center.propTypes = { | ||
children: PropTypes.node, | ||
}; | ||
|
||
export default LayoutCenter; | ||
export default Center; |
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 |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
justify-content: center; | ||
width: 100%; | ||
height: 100%; | ||
min-height: 100vh; | ||
} |
6 changes: 3 additions & 3 deletions
6
...outCenter/__tests__/LayoutCenter.test.jsx → ...s/layout/Center/__tests__/Center.test.jsx
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
File renamed without changes.
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 @@ | ||
export { default } from './Center'; |
This file was deleted.
Oops, something went wrong.
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