From 12a03a9a72f7895d571dbaeeb245d92aa277a610 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 6 Oct 2023 17:48:03 +0200
Subject: refactor(components): merge HeadingButton and Widget components

The HeadingButton component was only used inside Widget component and
it is not very useful on its own so I merge the two components in a
new Collapsible component.
---
 src/components/organisms/widgets/social-media.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/components/organisms/widgets/social-media.tsx')

diff --git a/src/components/organisms/widgets/social-media.tsx b/src/components/organisms/widgets/social-media.tsx
index ddeb09c..14c8fe6 100644
--- a/src/components/organisms/widgets/social-media.tsx
+++ b/src/components/organisms/widgets/social-media.tsx
@@ -1,13 +1,13 @@
 import type { FC } from 'react';
 import { List, ListItem, SocialLink, type SocialLinkProps } from '../../atoms';
-import { Widget, type WidgetProps } from '../../molecules';
+import { Collapsible, type CollapsibleProps } from '../../molecules';
 import styles from './social-media.module.scss';
 
 export type Media = Required<
   Pick<SocialLinkProps, 'icon' | 'id' | 'label' | 'url'>
 >;
 
-export type SocialMediaProps = Pick<WidgetProps, 'level' | 'title'> & {
+export type SocialMediaProps = Omit<CollapsibleProps, 'children'> & {
   media: Media[];
 };
 
@@ -31,10 +31,10 @@ export const SocialMedia: FC<SocialMediaProps> = ({ media, ...props }) => {
     ));
 
   return (
-    <Widget expanded={true} {...props}>
+    <Collapsible {...props}>
       <List className={styles.list} hideMarker isInline spacing="xs">
         {getItems(media)}
       </List>
-    </Widget>
+    </Collapsible>
   );
 };
-- 
cgit v1.2.3

