From 65b69784825ed73fcad12b28da7d42c15081f945 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Thu, 22 Aug 2024 17:03:10 +0200 Subject: [PATCH] Updated layout switch --- .../src/components/Activities.tsx | 2 +- .../src/components/Inbox.tsx | 40 +++-------------- .../src/components/Profile.tsx | 2 +- .../src/components/Search.tsx | 8 ++-- .../components/navigation/MainNavigation.tsx | 44 ++++++++++++++++--- .../src/assets/icons/card-list.svg | 1 + .../src/assets/icons/column-layout.svg | 1 + 7 files changed, 52 insertions(+), 46 deletions(-) create mode 100644 apps/admin-x-design-system/src/assets/icons/card-list.svg create mode 100644 apps/admin-x-design-system/src/assets/icons/column-layout.svg diff --git a/apps/admin-x-activitypub/src/components/Activities.tsx b/apps/admin-x-activitypub/src/components/Activities.tsx index 14363cea24..bbca25e7e7 100644 --- a/apps/admin-x-activitypub/src/components/Activities.tsx +++ b/apps/admin-x-activitypub/src/components/Activities.tsx @@ -9,7 +9,7 @@ const Activities: React.FC = ({}) => { // const fakeAuthor = return ( <> - +
diff --git a/apps/admin-x-activitypub/src/components/Inbox.tsx b/apps/admin-x-activitypub/src/components/Inbox.tsx index e49eab6545..879b162b9f 100644 --- a/apps/admin-x-activitypub/src/components/Inbox.tsx +++ b/apps/admin-x-activitypub/src/components/Inbox.tsx @@ -6,7 +6,7 @@ import NiceModal from '@ebay/nice-modal-react'; import React, {useState} from 'react'; import {Activity} from './activities/ActivityItem'; import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub'; -import {Button, Heading, Select, SelectOption, Tooltip} from '@tryghost/admin-x-design-system'; +import {Button, Heading} from '@tryghost/admin-x-design-system'; import {useBrowseInboxForUser} from '../MainContent'; interface InboxProps {} @@ -33,44 +33,14 @@ const Inbox: React.FC = ({}) => { }); }; - const selectOptions: SelectOption[] = [ - {value: 'option-1', label: 'Home'}, - {value: 'option-2', label: 'Posts'}, - {value: 'option-3', label: 'Notes'}, - {value: 'option-4', label: 'Media'} - ]; - - const defaultValue: SelectOption = { - value: 'option-1', label: 'Home' - }; - - const controlClasses = { - control: '!bg-transparent !hidden mr-2 !pl-0 text-xl font-bold', - menu: '!min-w-[120px]' + const handleLayoutChange = (newLayout: string) => { + setLayout(newLayout); }; return ( <> - -
-
-