allow tags to vertically grow, start using module-scoped css

This commit is contained in:
Collin M. Barrett 2019-08-07 15:51:50 -05:00
parent 8f93fe1368
commit 4f2e2e7c36
5 changed files with 10 additions and 5 deletions

View file

@ -1,6 +1,4 @@
td > div,
td > blockquote,
td > p {
td > * {
/* limit table cells from wrapping more than 2 lines */
/* https://stackoverflow.com/a/13924997/2343739 */
/* https://stackoverflow.com/a/22042054/2343739 */

View file

@ -1,5 +1,5 @@
import { SubscribeButton } from './buttons';
import { Description } from './Description';
import { TagCloud } from './TagCloud';
import { TagCloud } from './tagCloud';
export { SubscribeButton, Description, TagCloud };

View file

@ -0,0 +1,3 @@
.grow {
max-height: none !important;
}

View file

@ -1,5 +1,6 @@
import { Tag } from 'antd';
import * as React from "react";
import styles from './TagCloud.module.css';
interface TagData {
description: string;
@ -12,7 +13,7 @@ interface Props {
export const TagCloud = (props: Props): JSX.Element | null => {
return props.tags
? <div>
? <div className={styles.grow}>
{props.tags.map((t: TagData, i: number) =>
<Tag key={i} title={t.description}>{t.name}</Tag>)}
</div>

View file

@ -0,0 +1,3 @@
import { TagCloud } from './TagCloud';
export { TagCloud };