Skip to content

Commit

Permalink
add header logo showHiveMQText and realign
Browse files Browse the repository at this point in the history
  • Loading branch information
antpaw committed Aug 2, 2024
1 parent 969e0ed commit aef3839
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/modules/Header/HeaderLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ export type HeaderLogoProps = BoxProps & {
* Alternative text for the logo
*/
alt: string
/**
* Show/hide "HiveMQ" text
*/
showHiveMQText?: boolean
}

/**
* HeaderLogo component
* Second parameter of the forwardRef generic has to be of the component bound to `as` prop
*/
export const HeaderLogo = forwardRef<HeaderLogoProps, 'button'>(
({ children, src, alt, title, as = 'button', ...props }, ref) => {
({ children, src, alt, title, showHiveMQText = true, as = 'button', ...props }, ref) => {
return (
<Box
type="button"
Expand All @@ -35,7 +39,12 @@ export const HeaderLogo = forwardRef<HeaderLogoProps, 'button'>(
{...props}
>
<Image src={src} alt={alt} />
<Text as="span" color="white" fontWeight={700} fontSize="1.1rem">
{showHiveMQText && (
<Text as="span" color="white" fontSize="1.2rem">
HiveMQ
</Text>
)}
<Text as="span" color="white" fontWeight={700} fontSize="1.2rem">
{title}
</Text>
</Box>
Expand Down
1 change: 1 addition & 0 deletions src/modules/Sidebar/SidebarGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function SidebarGroup({ Title, children, ...props }: SidebarGroupProps) {
fontWeight={700}
textTransform="uppercase"
color="surface.600"
fontSize="sm"
>
{Title}
</Box>
Expand Down

0 comments on commit aef3839

Please sign in to comment.