From 4f2e2e7c3620155621c6622a37cd93862e3b4bd0 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Wed, 7 Aug 2019 15:51:50 -0500 Subject: [PATCH] allow tags to vertically grow, start using module-scoped css --- .../src/modules/allListsTable/AllListsTable.css | 4 +--- src/FilterLists.Web.V2/src/shared/index.ts | 2 +- .../src/shared/tagCloud/TagCloud.module.css | 3 +++ src/FilterLists.Web.V2/src/shared/{ => tagCloud}/TagCloud.tsx | 3 ++- src/FilterLists.Web.V2/src/shared/tagCloud/index.ts | 3 +++ 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css rename src/FilterLists.Web.V2/src/shared/{ => tagCloud}/TagCloud.tsx (82%) create mode 100644 src/FilterLists.Web.V2/src/shared/tagCloud/index.ts diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css index 17211aa65..5a637ae03 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css @@ -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 */ diff --git a/src/FilterLists.Web.V2/src/shared/index.ts b/src/FilterLists.Web.V2/src/shared/index.ts index 4d83351b7..7ed61c7b7 100644 --- a/src/FilterLists.Web.V2/src/shared/index.ts +++ b/src/FilterLists.Web.V2/src/shared/index.ts @@ -1,5 +1,5 @@ import { SubscribeButton } from './buttons'; import { Description } from './Description'; -import { TagCloud } from './TagCloud'; +import { TagCloud } from './tagCloud'; export { SubscribeButton, Description, TagCloud }; diff --git a/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css new file mode 100644 index 000000000..42f8db99a --- /dev/null +++ b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css @@ -0,0 +1,3 @@ +.grow { + max-height: none !important; +} diff --git a/src/FilterLists.Web.V2/src/shared/TagCloud.tsx b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.tsx similarity index 82% rename from src/FilterLists.Web.V2/src/shared/TagCloud.tsx rename to src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.tsx index 2a8bf3400..6d38c971d 100644 --- a/src/FilterLists.Web.V2/src/shared/TagCloud.tsx +++ b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.tsx @@ -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 - ?
+ ?
{props.tags.map((t: TagData, i: number) => {t.name})}
diff --git a/src/FilterLists.Web.V2/src/shared/tagCloud/index.ts b/src/FilterLists.Web.V2/src/shared/tagCloud/index.ts new file mode 100644 index 000000000..1e8216050 --- /dev/null +++ b/src/FilterLists.Web.V2/src/shared/tagCloud/index.ts @@ -0,0 +1,3 @@ +import { TagCloud } from './TagCloud'; + +export { TagCloud };