UNPKG

@hitachivantara/uikit-react-core

Version:
30 lines (29 loc) 1.02 kB
import { HvTypography } from "../../Typography/Typography.js"; import { useClasses } from "./Brand.styles.js"; import { useDefaultProps } from "@hitachivantara/uikit-react-utils"; import { forwardRef } from "react"; import { jsx, jsxs } from "react/jsx-runtime"; //#region src/Header/Brand/Brand.tsx /** * Header component is used to render a header bar with logo and brand name, navigation and actions. */ var HvHeaderBrand = forwardRef(function HvHeaderBrand(props, ref) { const { classes: classesProp, logo, name, className, ...others } = useDefaultProps("HvHeaderBrand", props); const { classes, cx } = useClasses(classesProp); return /* @__PURE__ */ jsxs("div", { ref, className: cx(classes.root, className), ...others, children: [ logo, logo && name && /* @__PURE__ */ jsx("div", { className: classes.separator }), name && /* @__PURE__ */ jsx(HvTypography, { className: classes.brandName, variant: "label", children: name }) ] }); }); //#endregion export { HvHeaderBrand };