From 9c8921db92d16b07ffc2a63ff3c80c4dcdd9ff9d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 10 May 2022 17:38:07 +0200 Subject: chore: add Project single pages --- src/components/organisms/widgets/sharing.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/components/organisms/widgets/sharing.tsx') diff --git a/src/components/organisms/widgets/sharing.tsx b/src/components/organisms/widgets/sharing.tsx index 05a3f73..85dadb0 100644 --- a/src/components/organisms/widgets/sharing.tsx +++ b/src/components/organisms/widgets/sharing.tsx @@ -21,11 +21,19 @@ export type SharingData = { url: string; }; -export type SharingProps = Pick & { +export type SharingProps = { /** * The page data to share. */ data: SharingData; + /** + * The widget default state. + */ + expanded?: WidgetProps['expanded']; + /** + * The HTML heading level. + */ + level?: WidgetProps['level']; /** * A list of active and ordered sharing medium. */ @@ -37,8 +45,19 @@ export type SharingProps = Pick & { * * Render a list of sharing links inside a widget. */ -const Sharing: FC = ({ data, media, ...props }) => { +const Sharing: FC = ({ + data, + media, + expanded = true, + level = 2, + ...props +}) => { const intl = useIntl(); + const widgetTitle = intl.formatMessage({ + defaultMessage: 'Share', + id: 'q3U6uI', + description: 'Sharing: widget title', + }); /** * Build the Diaspora sharing url with provided data. @@ -181,7 +200,7 @@ const Sharing: FC = ({ data, media, ...props }) => { }; return ( - +
    {getItems()}
); -- cgit v1.2.3