From 0a091831de579c635e87d31bd571842ff473ddd8 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 1 Feb 2022 15:03:06 -0600 Subject: [PATCH] Restyle tags --- web/components/create-fold-button.tsx | 3 ++- web/components/edit-fold-button.tsx | 2 +- web/components/tags-input.tsx | 4 ++-- web/components/tags-list.tsx | 26 +++++++------------------- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/web/components/create-fold-button.tsx b/web/components/create-fold-button.tsx index ff90af12..aa8cbae0 100644 --- a/web/components/create-fold-button.tsx +++ b/web/components/create-fold-button.tsx @@ -111,7 +111,7 @@ export function CreateFoldButton() { - + @@ -134,6 +134,7 @@ export function CreateFoldButton() { `#${tag}`)} noLink + noLabel /> diff --git a/web/components/edit-fold-button.tsx b/web/components/edit-fold-button.tsx index bba67320..3f41b6fe 100644 --- a/web/components/edit-fold-button.tsx +++ b/web/components/edit-fold-button.tsx @@ -105,7 +105,7 @@ export function EditFoldButton(props: { fold: Fold; className?: string }) { - `#${tag}`)} noLink /> + `#${tag}`)} noLink noLabel />
diff --git a/web/components/tags-input.tsx b/web/components/tags-input.tsx index 98818008..24b4a20c 100644 --- a/web/components/tags-input.tsx +++ b/web/components/tags-input.tsx @@ -4,7 +4,7 @@ import { parseWordsAsTags } from '../../common/util/parse' import { Contract, updateContract } from '../lib/firebase/contracts' import { Col } from './layout/col' import { Row } from './layout/row' -import { CompactTagsList } from './tags-list' +import { TagsList } from './tags-list' export function TagsInput(props: { contract: Contract; className?: string }) { const { contract, className } = props @@ -27,7 +27,7 @@ export function TagsInput(props: { contract: Contract; className?: string }) { return ( - `#${tag}`)} /> + `#${tag}`)} /> - {tag} + {tag}
) @@ -29,10 +28,12 @@ export function TagsList(props: { tags: string[] className?: string noLink?: boolean + noLabel?: boolean }) { - const { tags, className, noLink } = props + const { tags, className, noLink, noLabel } = props return ( - + + {!noLabel &&
Tags
} {tags.map((tag) => ( ))} @@ -40,19 +41,6 @@ export function TagsList(props: { ) } -export function CompactTagsList(props: { tags: string[] }) { - const { tags } = props - return ( - - {tags.map((tag) => ( -
- -
- ))} -
- ) -} - export function FoldTag(props: { fold: Fold }) { const { fold } = props const { name } = fold @@ -60,7 +48,7 @@ export function FoldTag(props: { fold: Fold }) {