bigbuffet-rw/app/soapbox/components/column.js
marcin mikołajczak 1796a35951 Partially fix post navigation
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-10-26 17:38:49 +02:00

34 lines
710 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Column extends React.PureComponent {
static propTypes = {
className: PropTypes.string,
transparent: PropTypes.bool,
children: PropTypes.node,
label: PropTypes.string,
};
setRef = c => {
this.node = c;
}
render() {
const { className, label, children, transparent, ...rest } = this.props;
return (
<div
role='region'
aria-label={label}
className={classNames('column', className, { 'column--transparent': transparent })}
{...rest}
ref={this.setRef}
>
{children}
</div>
);
}
}