Skip to content

Commit

Permalink
Merge pull request #73 from OrigenStudio/develop
Browse files Browse the repository at this point in the history
v0.1.0-rc.8
  • Loading branch information
ochicf authored Jan 7, 2019
2 parents 189ed08 + ebba135 commit 4105b0c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-ui-layout",
"version": "0.1.0-rc.7",
"version": "0.1.0-rc.8",
"description": "Layout components for material-ui",
"main": "./lib/index.js",
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ import styles from './styles';
type Props = {
classes: Classes,
children: React.Element<any>,
color: string,
className: string,
color?: 'inherit' | 'default' | 'primary' | 'secondary',
className?: string,
};

class Footer extends React.PureComponent<Props> {
static defaultProps = {
classes: {},
color: 'inherit',
className: '',
};
render() {
const {
classes, color, className: classNameProp, children,
Expand Down
11 changes: 10 additions & 1 deletion src/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class Layout extends React.PureComponent<Props> {
[`${classes.mainLeftRightShift}`]: mainLeftShift && mainRightShift,
});

const footerClassnames: string = classNames(
classes.footer,
footerProps ? footerProps.className : '',
);

const appBarLeftShift =
!smallScreen &&
(!leftDrawerUnder &&
Expand Down Expand Up @@ -235,7 +240,11 @@ class Layout extends React.PureComponent<Props> {
>
<main className={mainClassnames}>{children}</main>
</LayoutActions.Provider>
{footerContent ? <Footer {...footerProps}>{footerContent}</Footer> : null}
{footerContent ? (
<Footer {...footerProps} className={footerClassnames}>
{footerContent}
</Footer>
) : null}
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const styles = (theme: Object): Object => ({
drawerPaperUnder: {
zIndex: '1000',
},
footer: {},
});

export default styles;

0 comments on commit 4105b0c

Please sign in to comment.