Skip to content

Commit 4105b0c

Browse files
authored
Merge pull request #73 from OrigenStudio/develop
v0.1.0-rc.8
2 parents 189ed08 + ebba135 commit 4105b0c

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "material-ui-layout",
3-
"version": "0.1.0-rc.7",
3+
"version": "0.1.0-rc.8",
44
"description": "Layout components for material-ui",
55
"main": "./lib/index.js",
66
"scripts": {

src/components/Footer/Footer.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ import styles from './styles';
1111
type Props = {
1212
classes: Classes,
1313
children: React.Element<any>,
14-
color: string,
15-
className: string,
14+
color?: 'inherit' | 'default' | 'primary' | 'secondary',
15+
className?: string,
1616
};
1717

1818
class Footer extends React.PureComponent<Props> {
19+
static defaultProps = {
20+
classes: {},
21+
color: 'inherit',
22+
className: '',
23+
};
1924
render() {
2025
const {
2126
classes, color, className: classNameProp, children,

src/components/Layout/Layout.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class Layout extends React.PureComponent<Props> {
140140
[`${classes.mainLeftRightShift}`]: mainLeftShift && mainRightShift,
141141
});
142142

143+
const footerClassnames: string = classNames(
144+
classes.footer,
145+
footerProps ? footerProps.className : '',
146+
);
147+
143148
const appBarLeftShift =
144149
!smallScreen &&
145150
(!leftDrawerUnder &&
@@ -235,7 +240,11 @@ class Layout extends React.PureComponent<Props> {
235240
>
236241
<main className={mainClassnames}>{children}</main>
237242
</LayoutActions.Provider>
238-
{footerContent ? <Footer {...footerProps}>{footerContent}</Footer> : null}
243+
{footerContent ? (
244+
<Footer {...footerProps} className={footerClassnames}>
245+
{footerContent}
246+
</Footer>
247+
) : null}
239248
</div>
240249
);
241250
}

src/components/Layout/styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const styles = (theme: Object): Object => ({
113113
drawerPaperUnder: {
114114
zIndex: '1000',
115115
},
116+
footer: {},
116117
});
117118

118119
export default styles;

0 commit comments

Comments
 (0)