Skip to content

Commit

Permalink
- Breaking: SidebarMenuHeading is now stricter, and does not allow co…
Browse files Browse the repository at this point in the history
…ntentLeft, contentRight or custom Text props.
  • Loading branch information
mattias800 committed Sep 7, 2023
1 parent af70485 commit eb13502
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions packages/panels/src/components/sidebar-menu/SidebarMenuHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import { Box, Space, Text, TextProps } from "@stenajs-webui/core";
import { Box, Space, Text } from "@stenajs-webui/core";
import * as React from "react";
import { CollapsibleSimpleContentProps } from "../collapsible/CollapsibleContent";

export interface SidebarMenuHeadingProps
extends Pick<CollapsibleSimpleContentProps, "contentLeft" | "contentRight">,
TextProps {
label?: string;
export interface SidebarMenuHeadingProps {
label: string;
}

export const SidebarMenuHeading: React.FC<SidebarMenuHeadingProps> = ({
className,
label,
contentLeft,
contentRight,
...textProps
}) => {
return (
<Box height={"32px"} justifyContent={"center"} indent={2}>
<Space />
<Text variant={"overline"} size={"smaller"} {...textProps}>
<Text variant={"overline"} size={"smaller"}>
{label}
</Text>
</Box>
Expand Down

0 comments on commit eb13502

Please sign in to comment.