From 1ee541ebfb085a18d694fff6f8aba46d7bbc6f24 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Wed, 12 Aug 2026 11:37:32 +0200 Subject: [PATCH] [Glitch] Change design of "New collection" button in "Add to collection" dialog Port b55b426dfb5471ec4601279a44f3ed4471d69cda to glitch-soc Signed-off-by: Claire --- .../features/collection_adder/index.tsx | 9 ++++++-- .../collection_adder/styles.module.scss | 4 +--- .../overview/created_by_account.tsx | 23 +++++++++++++------ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/app/javascript/flavours/glitch/features/collection_adder/index.tsx b/app/javascript/flavours/glitch/features/collection_adder/index.tsx index 21a1772804..28baca2007 100644 --- a/app/javascript/flavours/glitch/features/collection_adder/index.tsx +++ b/app/javascript/flavours/glitch/features/collection_adder/index.tsx @@ -174,12 +174,17 @@ export const CollectionAdder: React.FC<{ /> } > - + ) : ( <>
- + + +
{collections.map((item) => ( diff --git a/app/javascript/flavours/glitch/features/collection_adder/styles.module.scss b/app/javascript/flavours/glitch/features/collection_adder/styles.module.scss index 99ecf1373e..0a0ee300b8 100644 --- a/app/javascript/flavours/glitch/features/collection_adder/styles.module.scss +++ b/app/javascript/flavours/glitch/features/collection_adder/styles.module.scss @@ -1,5 +1,3 @@ .newCollection { - display: flex; - justify-content: center; - padding-block: 16px; + padding: 16px; } diff --git a/app/javascript/flavours/glitch/features/collections/overview/created_by_account.tsx b/app/javascript/flavours/glitch/features/collections/overview/created_by_account.tsx index 7ac5f89307..0be6c1ac10 100644 --- a/app/javascript/flavours/glitch/features/collections/overview/created_by_account.tsx +++ b/app/javascript/flavours/glitch/features/collections/overview/created_by_account.tsx @@ -1,7 +1,9 @@ +import type { ReactNode } from 'react'; import { useEffect } from 'react'; import { FormattedMessage } from 'react-intl'; +import classNames from 'classnames'; import { Link } from 'react-router-dom'; import AddIcon from '@/material-icons/400-24px/add.svg?react'; @@ -29,16 +31,23 @@ import { } from '../editor'; import classes from '../styles.module.scss'; -export const NewCollectionButton: React.FC<{ onClick?: () => void }> = ({ - onClick, -}) => ( +export const NewCollectionButton: React.FC<{ + compact?: boolean; + secondary?: boolean; + onClick?: () => void; + children?: ReactNode; +}> = ({ compact, secondary, onClick, children }) => ( - + {children ?? } ); @@ -106,7 +115,7 @@ export const CollectionsCreatedByAccount: React.FC = () => { /> } > - + ); } else { @@ -138,7 +147,7 @@ export const CollectionsCreatedByAccount: React.FC = () => { }} /> - {showCreateButton && } + {showCreateButton && } {isOwnCollectionPage && !canCreateMoreCollections && (