Skip to content

Commit

Permalink
allow for a right element in section header
Browse files Browse the repository at this point in the history
  • Loading branch information
SirCotare committed Oct 17, 2024
1 parent d3f1aae commit b7fc40e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/section/SectionHeader/SectionHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { ReactNode } from 'react'
import { SectionHeaderArea } from './SectionHeaderArea'
import { SectionHeaderTitle } from './SectionHeaderTitle'
import { SectionHeaderRow, SectionHeaderRowLayout } from './SectionHeaderRow'

export type SectionHeaderProps = {
title: ReactNode
className?: string
right?: ReactNode
}

export function SectionHeader({ className, title }: SectionHeaderProps) {
export function SectionHeader({ className, title, right }: SectionHeaderProps) {
return (
<SectionHeaderArea className={className}>
<SectionHeaderTitle>{title}</SectionHeaderTitle>
<SectionHeaderRow layout={SectionHeaderRowLayout.SpaceBetween}>
<SectionHeaderTitle>{title}</SectionHeaderTitle>
{right}
</SectionHeaderRow>
</SectionHeaderArea>
)
}

0 comments on commit b7fc40e

Please sign in to comment.