From db761289c83cf31b835ae9e0f129e19b2c9b2277 Mon Sep 17 00:00:00 2001 From: Jonas de Luna Skulberg Date: Tue, 10 Sep 2024 21:00:30 +0200 Subject: [PATCH] Update to use dropdown --- app/components/Comments/CommentView.css | 17 ++--- app/components/Comments/CommentView.tsx | 98 ++++++++++++------------- 2 files changed, 50 insertions(+), 65 deletions(-) diff --git a/app/components/Comments/CommentView.css b/app/components/Comments/CommentView.css index 535f029b28..009ba9b4e1 100644 --- a/app/components/Comments/CommentView.css +++ b/app/components/Comments/CommentView.css @@ -1,16 +1,9 @@ .headerContainer { - margin-bottom: 0.25rem; + margin-bottom: var(--spacing-sm); } -.sortIcon { - flex-direction: column; -} - -.iconWrapper { - margin-left: 0.25rem; -} - -.sortList { - margin-left: 0.5rem; - min-width: 10rem; +.dropdownElement { + padding: var(--spacing-sm); + cursor: pointer; + width: var(--spacing-ss); } diff --git a/app/components/Comments/CommentView.tsx b/app/components/Comments/CommentView.tsx index be40613005..b2842252b2 100644 --- a/app/components/Comments/CommentView.tsx +++ b/app/components/Comments/CommentView.tsx @@ -1,15 +1,10 @@ -import { - FilterSection, - Flex, - Icon, - LoadingIndicator, -} from '@webkom/lego-bricks'; +import { Flex, Icon, LoadingIndicator } from '@webkom/lego-bricks'; import { ListFilter } from 'lucide-react'; import moment from 'moment'; import { useEffect, useState, type CSSProperties } from 'react'; import CommentForm from 'app/components/CommentForm'; +import Dropdown from 'app/components/Dropdown'; import { generateTreeStructure } from 'app/utils'; -import { SelectInput } from '../Form'; import CommentTree from './CommentTree'; import styles from './CommentView.css'; import type Comment from 'app/store/models/Comment'; @@ -36,13 +31,9 @@ const orderingOptions: Array