mirror of
https://github.com/be5invis/Iosevka.git
synced 2026-10-28 00:18:43 +00:00
31 lines
673 B
TypeScript
31 lines
673 B
TypeScript
import { joinCls } from "../utils/join-classes";
|
|
|
|
export type SectionProps = {
|
|
id?: string;
|
|
className?: string;
|
|
withToolbar?: boolean;
|
|
children?: React.ReactNode;
|
|
};
|
|
export function Section(props: SectionProps) {
|
|
return (
|
|
<section
|
|
id={props.id}
|
|
className={joinCls(props.withToolbar ? "with-toolbar" : null, props.className)}
|
|
>
|
|
<div className="section-inner">{props.children}</div>
|
|
</section>
|
|
);
|
|
}
|
|
export function SectionToolbar(props: SectionProps) {
|
|
return (
|
|
<div
|
|
className={joinCls(
|
|
"toolbar",
|
|
props.withToolbar ? "section-toolbar" : "separate-toolbar",
|
|
)}
|
|
>
|
|
<div className="section-inner">{props.children}</div>
|
|
</div>
|
|
);
|
|
}
|