import React, { CSSProperties, PropsWithChildren, ReactNode } from "react"; import { RegisteredLinkProps } from "./link"; import { ButtonProps } from "./Button"; import { InputProps } from "./Input"; import { CxArg } from "tss-react"; export type FollowProps = { id?: string; className?: string; classes?: Partial>; style?: CSSProperties; newsletter?: FollowProps.Newsletter; social?: FollowProps.Social; } & (FollowProps.EitherNewsletter | FollowProps.EitherSocial | FollowProps.EitherBoth); export declare namespace FollowProps { type EitherNewsletter = { newsletter: Newsletter; social?: Social; }; type EitherSocial = { newsletter?: Newsletter; social: Social; }; type EitherBoth = { newsletter: Newsletter; social: Social; }; type TitleAs = { title?: ReactNode; /** * Display only. The tag will stay `h2`. * * @default "h5" */ titleAs?: `h${2 | 3 | 4 | 5 | 6}`; }; type NewsletterForm = { /** Bound props to display success alert */ success: boolean; successMessage?: NonNullable; /** * @example * ```tsx *
{children}
, * }, * }} * /> * ``` */ formComponent: ({ children }: TProps) => React.ReactNode; consentHint?: ReactNode; inputProps?: Partial>; }; type NewsletterWithForm = { /** "Subscribe" button */ buttonProps: ButtonProps.Common & ButtonProps.AsButton & Partial; /** When using a form */ form: NewsletterForm; }; type NewsletterWithoutForm = { /** "Subscribe" button */ buttonProps: ButtonProps.Common & (ButtonProps.AsButton | ButtonProps.AsAnchor) & Partial; /** When using a form */ form?: never; }; type Newsletter = TitleAs & { desc?: ReactNode; } & (NewsletterWithForm | NewsletterWithoutForm); /** * From DSFR `$follow-icons` + `copy` and `mail` */ type SocialType = "copy" | "dailymotion" | "facebook" | "github" | "instagram" | "linkedin" | "mail" | "mastodon" | "snapchat" | "telegram" | "threads" | "tiktok" | "twitch" | "twitter" | "twitter-x" | "vimeo" | "youtube"; type SocialButton = { type: SocialType; linkProps: RegisteredLinkProps; }; type Social = TitleAs & { buttons: [SocialButton, ...SocialButton[]]; }; } /** @see */ export declare const Follow: React.MemoExoticComponent>>; export default Follow;