diff --git a/src/chrome/mainsidebar/MainSidebar2.tsx b/src/chrome/mainsidebar/MainSidebar2.tsx
index 1fc600712..54a20ac8d 100644
--- a/src/chrome/mainsidebar/MainSidebar2.tsx
+++ b/src/chrome/mainsidebar/MainSidebar2.tsx
@@ -67,6 +67,18 @@ type PluginsByCategory = [string, FlipperPlugins][];
type SectionLevel = 1 | 2 | 3;
+const ShowMoreButton = styled('div')<{collapsed: boolean}>(({collapsed}) => ({
+ border: `1px solid ${colors.macOSTitleBarIconBlur}`,
+ width: 16,
+ height: 16,
+ borderRadius: 16,
+ marginLeft: 'auto',
+ marginRight: 'auto',
+ lineHeight: '12px',
+ transform: collapsed ? 'rotate(0deg)' : 'rotate(-180deg)',
+ transition: `transform 0.3s ease`,
+}));
+
const SidebarSectionButton = styled('button')<{
level: SectionLevel;
color: string;
@@ -99,6 +111,13 @@ const SidebarSectionBody = styled('div')<{
level === 2 ? `1px solid ${colors.sectionHeaderBorder}` : undefined,
}));
+const SidebarSectionButtonGlyph = styled(Glyph)<{collapsed: boolean}>(
+ ({collapsed}) => ({
+ transform: collapsed ? 'rotate(90deg)' : 'rotate(180deg)',
+ transition: `transform 0.3s ease`,
+ }),
+);
+
const SidebarSection: React.FC<{
defaultCollapsed?: boolean;
title: string | React.ReactNode | ((collapsed: boolean) => React.ReactNode);
@@ -118,10 +137,11 @@ const SidebarSection: React.FC<{
{typeof title === 'function' ? title(collapsed) : title}
{level < 3 && children && (
-
)}
@@ -197,7 +217,7 @@ class MainSidebar2 extends PureComponent {
render() {
const {devices} = this.props;
return (
-
+
{devices.length ? (
devices.map(device => this.renderDevice(device))
@@ -531,11 +551,11 @@ const PluginList = memo(function PluginList({
favoritePlugins.length > 0 && !selectedNonFavoritePlugin
}
title={collapsed => (
-
+
)}>
@@ -612,13 +632,3 @@ const PluginsByCategory = memo(function PluginsByCategory({
>
);
});
-
-const ShowMoreButton = styled('div')({
- border: `1px solid ${colors.macOSTitleBarIconBlur}`,
- width: 16,
- height: 16,
- borderRadius: 16,
- marginLeft: 'auto',
- marginRight: 'auto',
- lineHeight: '12px',
-});