terra-clinical-item-view
Version:
The Item View component allows displays to be organized into rows and column and themed, while providing means to add accessory elements and a comment.
21 lines (16 loc) • 651 B
JSX
import React from 'react';
import classNames from 'classnames/bind';
import ItemView from '../../../ItemView';
import styles from './ItemViewCommon.test.module.scss';
const cx = classNames.bind(styles);
const comment = id => <ItemView.Comment id={id} text="comment1comment1comment1comment1comment1comment1comment1comment1comment1comment1comment1comment1" />;
const ItemViews = () => (
<div className={cx('comment-itemview-wrapper')}>
<h2>Default</h2>
<ItemView comment={comment(1)} id="ItemView1" />
<br />
<h2>Truncated</h2>
<ItemView isTruncated comment={comment(2)} id="ItemView2" />
</div>
);
export default ItemViews;