Progress
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
import Icon from './icon'
|
||||
import Button from './button'
|
||||
import Heading from './heading'
|
||||
|
||||
const messages = defineMessages({
|
||||
show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' },
|
||||
@@ -46,7 +48,7 @@ class ColumnHeader extends PureComponent {
|
||||
this.historyBack()
|
||||
}
|
||||
|
||||
render () {
|
||||
render() {
|
||||
const { title, showBackBtn, icon, active, children, actions, intl: { formatMessage } } = this.props
|
||||
const { collapsed } = this.state
|
||||
|
||||
@@ -58,11 +60,13 @@ class ColumnHeader extends PureComponent {
|
||||
<Icon className={[_s.marginRight5PX, _s.fillColorBrand].join(' ')} id='back' width='20px' height='20px' />
|
||||
</button>
|
||||
}
|
||||
<h1 role='heading' className={[_s.default, _s.height100PC, _s.justifyContentCenter].join(' ')}>
|
||||
<span className={[_s.default, _s.text, _s.fontSize24PX, _s.fontWeightMedium, _s.colorPrimary].join(' ')}>
|
||||
|
||||
<div className={[_s.default, _s.height100PC, _s.justifyContentCenter].join(' ')}>
|
||||
<Heading size='h1'>
|
||||
{title}
|
||||
</span>
|
||||
</h1>
|
||||
</Heading>
|
||||
</div>
|
||||
|
||||
{
|
||||
!!actions &&
|
||||
<div className={[_s.default, _s.backgroundTransparent, _s.flexRow, _s.alignItemsCenter, _s.justifyContentCenter, _s.marginLeftAuto].join(' ')}>
|
||||
@@ -81,75 +85,6 @@ class ColumnHeader extends PureComponent {
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
||||
// const wrapperClassName = classNames('column-header__wrapper', {
|
||||
// 'column-header__wrapper--active': active,
|
||||
// })
|
||||
|
||||
// const buttonClassName = classNames('column-header', {
|
||||
// 'column-header--active': active,
|
||||
// })
|
||||
|
||||
// const btnTitle = formatMessage(collapsed ? messages.show : messages.hide)
|
||||
// const hasTitle = icon && title
|
||||
// const hasChildren = !!children
|
||||
|
||||
// if (!hasChildren && !hasTitle) {
|
||||
// return null
|
||||
// } else if (!hasChildren && hasTitle) {
|
||||
// return (
|
||||
// <div className={wrapperClassName}>
|
||||
// <h1 className={buttonClassName}>
|
||||
// <Icon id={icon} fixedWidth className='column-header__icon' />
|
||||
// {title}
|
||||
// </h1>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
|
||||
// const collapsibleClassName = classNames('column-header__collapsible', {
|
||||
// 'column-header__collapsible--collapsed': collapsed,
|
||||
// })
|
||||
|
||||
// const collapsibleButtonClassName = classNames('column-header__button', {
|
||||
// 'column-header__button--active': !collapsed,
|
||||
// })
|
||||
|
||||
// return (
|
||||
// <div className={wrapperClassName}>
|
||||
// <h1 className={buttonClassName}>
|
||||
// {
|
||||
// hasTitle && (
|
||||
// <Fragment>
|
||||
// <Icon id={icon} fixedWidth className='column-header__icon' />
|
||||
// {title}
|
||||
// </Fragment>
|
||||
// )
|
||||
// }
|
||||
|
||||
// <button
|
||||
// className={collapsibleButtonClassName}
|
||||
// title={btnTitle}
|
||||
// aria-label={btnTitle}
|
||||
// aria-pressed={!collapsed}
|
||||
// onClick={this.handleToggleClick}
|
||||
// >
|
||||
// <Icon id='sliders' />
|
||||
// </button>
|
||||
// </h1>
|
||||
|
||||
// <div className={collapsibleClassName} tabIndex={collapsed ? -1 : null}>
|
||||
// <div className='column-header__collapsible-inner'>
|
||||
// {
|
||||
// !collapsed &&
|
||||
// <div key='extra-content' className='column-header__collapsible__extra'>
|
||||
// {children}
|
||||
// </div>
|
||||
// }
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
// )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user