allow for arbitrary grouping of property values and intro PropertyPage

This commit is contained in:
Matt Hill
2023-05-03 14:56:41 -06:00
parent 8801760aa6
commit e645854d18
4 changed files with 36 additions and 16 deletions

View File

@@ -0,0 +1,18 @@
import { PackagePropertyPage } from "../types"
import { PropertyGroup } from "./PropertyGroup"
export class PropertyPage {
private constructor(readonly data: PackagePropertyPage) {}
static of(options: {
name: string
description: string | null
groups: PropertyGroup[]
}) {
return new PropertyPage({
type: "page",
name: options.name,
description: options.description,
value: options.groups.map((x) => x.data),
})
}
}