UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

28 lines (27 loc) 970 B
import React from 'react'; import createClass from 'create-react-class'; import { Tag } from '../../../index'; import _ from 'lodash'; const words = [ 'Fashion', 'The', 'Vexillologist', 'Cold Brew', 'This is a longer sentence that should be handled okay', ]; export default createClass({ render() { return (React.createElement("div", null, React.createElement(Tag, null, "Grouped items", _.times(8, n => (React.createElement(Tag, { key: n }, words[n % words.length])))), React.createElement(Tag, { isRemovable: true }, "Grouped items", _.times(10, n => (React.createElement(Tag, { isRemovable: true, key: n }, words[n % words.length])))))); }, }); // begin-hide-from-docs export const notes = ` Use a parent tag to group child tags into categories. This example also shows you how to dynamically generate a list of tags. `; // end-hide-from-docs