export interface BrandTitleOptions { /** * The title to display in the brand title. * It can be a simple string or raw HTML. */ title: string /** * The logo to display in the brand title. * It can be a simple string or raw HTML (e.g. ``). */ logo?: string | undefined } /** * Creates a brand title element for the Storybook manager UI. * * @param options - The options for customizing the brand title * @param options.title - The title text or HTML to display * @param options.logo - Optional logo HTML to display before the title * @returns An HTML string containing the brand title element * * @example * * ```ts * import { brandTitle } from '@repobuddy/storybook' * import { addons } from 'storybook/manager-api' * * addons.setConfig({ * brandTitle: brandTitle({ * title: 'My Storybook', * logo: 'Logo' * }) * }) * ``` */ export function brandTitle(options: BrandTitleOptions) { return ` ${options.logo ?? ''} ${options.title} ` }