From e78bbf4e19cf4041340f8c63eedf398686285be6 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Tue, 4 Apr 2023 06:29:09 -0400 Subject: [PATCH] Allow Admins to manage/leave Group --- .../components/ui/icon-button/icon-button.tsx | 8 ++- app/soapbox/components/ui/tag-input/tag.tsx | 1 - .../__tests__/group-options-button.test.tsx | 5 +- .../group/components/group-action-button.tsx | 3 +- .../group/components/group-options-button.tsx | 53 ++++++++++++++++--- app/soapbox/features/group/manage-group.tsx | 4 +- .../public-layout/components/header.tsx | 1 - app/soapbox/locales/en.json | 5 +- 8 files changed, 58 insertions(+), 22 deletions(-) diff --git a/app/soapbox/components/ui/icon-button/icon-button.tsx b/app/soapbox/components/ui/icon-button/icon-button.tsx index ad9d6a517..1ece137df 100644 --- a/app/soapbox/components/ui/icon-button/icon-button.tsx +++ b/app/soapbox/components/ui/icon-button/icon-button.tsx @@ -11,24 +11,22 @@ interface IIconButton extends React.ButtonHTMLAttributes { src: string /** Text to display next ot the button. */ text?: string - /** Don't render a background behind the icon. */ - transparent?: boolean /** Predefined styles to display for the button. */ - theme?: 'seamless' | 'outlined' | 'secondary' + theme?: 'seamless' | 'outlined' | 'secondary' | 'transparent' /** Override the data-testid */ 'data-testid'?: string } /** A clickable icon. */ const IconButton = React.forwardRef((props: IIconButton, ref: React.ForwardedRef): JSX.Element => { - const { src, className, iconClassName, text, transparent = false, theme = 'seamless', ...filteredProps } = props; + const { src, className, iconClassName, text, theme = 'seamless', ...filteredProps } = props; return (