diff --git a/src/components/FooterToolbar/index.js b/src/components/FooterToolbar/index.js index 81a8257f760b43d7db890d25082f7c2278f428cb..62527e9eb1b8e51214c3c08c9820553f1e0a62cd 100644 --- a/src/components/FooterToolbar/index.js +++ b/src/components/FooterToolbar/index.js @@ -1,39 +1,13 @@ import React, { Component } from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import styles from './index.less'; export default class FooterToolbar extends Component { - static contextTypes = { - layoutCollapsed: PropTypes.bool, - }; - state = { - width: '', - }; - componentDidMount() { - this.syncWidth(); - } - componentWillReceiveProps() { - this.syncWidth(); - } - syncWidth() { - const sider = document.querySelectorAll('.ant-layout-sider')[0]; - if (sider) { - this.setState({ - width: `calc(100% - ${sider.style.width})`, - }); - } - } render() { - const { children, style, className, extra, ...restProps } = this.props; + const { children, className, extra, ...restProps } = this.props; return (