From 6f1c1d9378536bd212032c84e0f35e074cca0941 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Tue, 16 Apr 2024 10:26:11 +0200 Subject: [PATCH] chore: Improve Activity Library focus and hover states (#9626) Signed-off-by: Matt Krick Co-authored-by: Matt Krick Co-authored-by: Dale Bumblis <135627447+dbumblis-parabol@users.noreply.github.com> --- .../ActivityLibrary/ActivityCard.tsx | 2 +- .../ActivityLibrary/ActivityGrid.tsx | 9 ++-- .../ActivityLibrary/ActivityLibraryCard.tsx | 14 ------ .../ActivityLibrary/CreateActivityCard.tsx | 11 +++-- .../CreateNewActivity/CreateNewActivity.tsx | 4 +- .../components/RetroDrawerTemplateCard.tsx | 47 ++++++++++--------- 6 files changed, 38 insertions(+), 49 deletions(-) delete mode 100644 packages/client/components/ActivityLibrary/ActivityLibraryCard.tsx diff --git a/packages/client/components/ActivityLibrary/ActivityCard.tsx b/packages/client/components/ActivityLibrary/ActivityCard.tsx index e0ccdbdf51d..724e791960b 100644 --- a/packages/client/components/ActivityLibrary/ActivityCard.tsx +++ b/packages/client/components/ActivityLibrary/ActivityCard.tsx @@ -94,7 +94,7 @@ export const ActivityCard = (props: ActivityCardProps) => { return (
diff --git a/packages/client/components/ActivityLibrary/ActivityGrid.tsx b/packages/client/components/ActivityLibrary/ActivityGrid.tsx index f9db6c34480..5892e37aca8 100644 --- a/packages/client/components/ActivityLibrary/ActivityGrid.tsx +++ b/packages/client/components/ActivityLibrary/ActivityGrid.tsx @@ -1,9 +1,8 @@ import React from 'react' import {Link} from 'react-router-dom' import {ActivityBadge} from './ActivityBadge' -import {ActivityCardImage} from './ActivityCard' +import {ActivityCard, ActivityCardImage} from './ActivityCard' import {Template} from './ActivityLibrary' -import {ActivityLibraryCard} from './ActivityLibraryCard' import {ActivityLibraryCardDescription} from './ActivityLibraryCardDescription' import {CATEGORY_THEMES, CategoryID} from './Categories' @@ -23,9 +22,9 @@ const ActivityGrid = ({templates, selectedCategory}: ActivityGridProps) => { pathname: `/activity-library/details/${template.id}`, state: {prevCategory: selectedCategory} }} - className='flex focus:rounded-md focus:outline-primary' + className='flex rounded-2xl hover:bg-slate-100 focus:outline-sky-500' > - { className='hidden group-hover/card:flex' templateRef={template} /> - + ) })} diff --git a/packages/client/components/ActivityLibrary/ActivityLibraryCard.tsx b/packages/client/components/ActivityLibrary/ActivityLibraryCard.tsx deleted file mode 100644 index 55055d77d94..00000000000 --- a/packages/client/components/ActivityLibrary/ActivityLibraryCard.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import clsx from 'clsx' -import React from 'react' -import {ActivityCard, ActivityCardProps} from './ActivityCard' - -export const ActivityLibraryCard = (props: ActivityCardProps) => { - const {className, ...rest} = props - - return ( - - ) -} diff --git a/packages/client/components/ActivityLibrary/CreateActivityCard.tsx b/packages/client/components/ActivityLibrary/CreateActivityCard.tsx index 38a2b7b9744..fbe52650e94 100644 --- a/packages/client/components/ActivityLibrary/CreateActivityCard.tsx +++ b/packages/client/components/ActivityLibrary/CreateActivityCard.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx' import React from 'react' import {Link} from 'react-router-dom' import {ActivityBadge} from './ActivityBadge' -import {ActivityLibraryCard} from './ActivityLibraryCard' +import {ActivityCard} from './ActivityCard' import {AllCategoryID, CATEGORY_ID_TO_NAME, CATEGORY_THEMES} from './Categories' interface Props { @@ -15,8 +15,11 @@ const CreateActivityCard = (props: Props) => { const {category, className} = props return ( - - + Premium} @@ -27,7 +30,7 @@ const CreateActivityCard = (props: Props) => {
Create Custom {category !== 'recommended' ? CATEGORY_ID_TO_NAME[category] : ''} Activity - + ) } diff --git a/packages/client/components/ActivityLibrary/CreateNewActivity/CreateNewActivity.tsx b/packages/client/components/ActivityLibrary/CreateNewActivity/CreateNewActivity.tsx index 2207adf83b2..8017e115b63 100644 --- a/packages/client/components/ActivityLibrary/CreateNewActivity/CreateNewActivity.tsx +++ b/packages/client/components/ActivityLibrary/CreateNewActivity/CreateNewActivity.tsx @@ -245,11 +245,11 @@ export const CreateNewActivity = (props: Props) => { return ( { return (
- Premium - ) : null - } - > - - - +
+ Premium + ) : null + } + > + + + +
) }