/* eslint-disable react/no-multi-comp */ import React from 'react'; import classNames from 'classnames'; import {IListItemProps, IPropsListItemColumn} from 'superdesk-api'; export class ListItem extends React.Component { render() { const inlineStyles: React.CSSProperties = { cursor: typeof this.props.onClick === 'function' ? 'pointer' : 'inherit', }; if (this.props.fullWidth) { inlineStyles.width = '100%'; } if (this.props.noBackground) { inlineStyles.background = 'transparent'; } return (
{this.props.children}
); } } export class ListItemColumn extends React.Component { render() { const {noBorder, justifyContent, ellipsisAndGrow, children, bold = false} = this.props; const cssClasses = []; if (noBorder) { cssClasses.push('sd-list-item__column--no-border'); } if (bold) { cssClasses.push('sd-text__strong'); } if (ellipsisAndGrow) { return (
{children}
); } else { return (
{children}
); } } } export class ListItemActionsMenu extends React.Component { render() { return (
{this.props.children}
); } } export class ListItemRow extends React.Component<{justifyContent?: string}> { render() { const {justifyContent} = this.props; return (
{this.props.children}
); } }