UNPKG

@hackplan/polaris

Version:

Shopify’s product component library

14 lines (13 loc) 565 B
import React from 'react'; import { classNames, variationName } from '../../utilities/css'; import { Item } from './components'; import styles from './List.scss'; export default class ContentList extends React.PureComponent { render() { const { children, type = 'bullet' } = this.props; const className = classNames(styles.List, type && styles[variationName('type', type)]); const ListElement = type === 'bullet' ? 'ul' : 'ol'; return <ListElement className={className}>{children}</ListElement>; } } ContentList.Item = Item;