VMAProps: {
    background: Color;
    children: React.ReactNode;
    CloseButtonProps?: {
        ariaLabel?: IconButtonProps["ariaLabel"];
        onClick: IconButtonProps["onClick"];
    };
    customAttribute?: {
        attribute: string;
        value: string | number;
    };
    customTranslations?: DeepPartial<Translations>;
    lang?: "en" | "sv";
    onClick?: (() => void);
    RouterLink?: React.ReactElement<any>;
}

Type declaration

  • background: Color

    The background color variant of the component

  • children: React.ReactNode

    Text content children

  • OptionalCloseButtonProps?: {
        ariaLabel?: IconButtonProps["ariaLabel"];
        onClick: IconButtonProps["onClick"];
    }

    If this prop is provided, a Close button will be rendered with the specified props.

  • OptionalcustomAttribute?: {
        attribute: string;
        value: string | number;
    }

    Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

    • attribute: string
    • value: string | number
  • OptionalcustomTranslations?: DeepPartial<Translations>

    Optional override of default translations

  • Optionallang?: "en" | "sv"

    Language used for internal translations.

  • OptionalonClick?: (() => void)

    An option to provide an onClick handler to make the component behave as a button. If both RouterLink and onClick listener are present, the RouterLink is preferred

      • (): void
      • Returns void

  • OptionalRouterLink?: React.ReactElement<any>

    An option to provide a valid router link element to make the component linked. Use for example NavLink from "react-router-dom" or equivalent from another routing library. If both RouterLink and onClick listener are present, the RouterLink is preferred