UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

67 lines (66 loc) 2.35 kB
/** * Web Logo Component */ import React from 'react'; import type { IconColor } from '../Icon'; import type { SpacingProps } from '../space/types'; export * from './LogoSvg'; export type LogoWidth = number | string; export type LogoHeight = number | string; /** * @deprecated Will be removed in eufemia v11. Use the `svg` prop to provide a custom logo instead. */ export type LogoVariant = 'default' | 'compact' | 'compactHorizontal'; export type CustomLogoSvg = React.ComponentType<React.SVGProps<SVGSVGElement> & { alt?: React.ReactNode; }> | React.ReactElement<React.SVGProps<SVGSVGElement> & { alt?: React.ReactNode; }>; export type LogoProps = { /** * Define the width of the logo. */ width?: LogoWidth; /** * Define the height of the logo. */ height?: LogoHeight; /** * Define the color of the logo. */ color?: IconColor; /** * Define which brands logo to show. `ui` (DNB) or `sbanken`. Defaults to `ui`. */ brand?: string; /** * Define the logo variant, if there is more than one variant of a brands logo. Currently the only option other than default is a `compact` variant of the Sbanken logo. Defaults to `default`. * @deprecated Will be removed in eufemia v11. Use the `svg` prop to provide a custom logo instead. */ variant?: LogoVariant; /** * Set to `true` if you do not want to inherit the color by `currentColor`. Defaults to `false`. */ inheritColor?: boolean; /** * Set to `true` if you want the logo to inherit the parent size */ inheritSize?: boolean; /** * Provide a custom SVG to render instead of the built-in logos. * Can be a React component (receives standard SVG props) or a React element. */ svg?: CustomLogoSvg; } & SpacingProps & Omit<React.HTMLProps<HTMLElement>, 'ref' | 'size'> & DeprecatedLogoProps; type DeprecatedLogoProps = { /** @deprecated Will be removed in eufemia v11 */ alt?: string; /** @deprecated Will be removed in eufemia v11 */ ratio?: number | string; /** @deprecated Use 'inheritColor' */ inherit_color?: boolean; /** @deprecated Will be removed in eufemia v11 */ size?: string | number; }; declare function Logo(localProps: LogoProps): import("react/jsx-runtime").JSX.Element; export default Logo;