mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 10:15:33 +02:00
client/property sheet component: add support for CSS class names
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import { ComponentChildren } from "preact";
|
||||
import clsx from "clsx";
|
||||
import "./PropertySheet.css";
|
||||
|
||||
export function PropertySheet({ children }: { children: ComponentChildren }) {
|
||||
return <div className="property-sheet-table">
|
||||
export function PropertySheet({ className, children }: { className?: string, children: ComponentChildren }) {
|
||||
return <div className={clsx("property-sheet-table", className)}>
|
||||
{children}
|
||||
</div>
|
||||
}
|
||||
|
||||
export function PropertySheetItem({label, children}: {label: string, children: ComponentChildren}) {
|
||||
export function PropertySheetItem({className, label, children}: {className?: string, label: string, children: ComponentChildren}) {
|
||||
return <dl>
|
||||
<dt>{label}</dt>
|
||||
<dd>{children}</dd>
|
||||
<dd className={className}>{children}</dd>
|
||||
</dl>
|
||||
}
|
||||
Reference in New Issue
Block a user