0
0
Fork 0

Added data-column="{account|local|federated|favourites|hashtag|home|notifications|mutes|blocks|getting-started|follow-requests}" to Column

This commit is contained in:
Ondřej Hruška 2017-08-06 21:27:47 +02:00
parent 7b42d14f45
commit b6bf04ece2
13 changed files with 18 additions and 14 deletions

View file

@ -13,6 +13,7 @@ export default class Column extends React.PureComponent {
children: PropTypes.node,
active: PropTypes.bool,
hideHeadingOnMobile: PropTypes.bool,
name: PropTypes.string,
};
handleHeaderClick = () => {
@ -36,7 +37,7 @@ export default class Column extends React.PureComponent {
}
render () {
const { heading, icon, children, active, hideHeadingOnMobile } = this.props;
const { heading, icon, children, active, hideHeadingOnMobile, name } = this.props;
const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth)));
@ -48,6 +49,7 @@ export default class Column extends React.PureComponent {
<div
ref={this.setRef}
role='region'
data-column={name}
aria-labelledby={columnHeaderId}
className='column'
onScroll={this.handleScroll}