mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-01 04:53:43 +00:00
add some comments, bump to rc4
This commit is contained in:
@@ -2,8 +2,16 @@ import { PackagePropertyGroup } from "../types"
|
||||
import { PropertyPage } from "./PropertyPage"
|
||||
import { PropertyString } from "./PropertyString"
|
||||
|
||||
/**
|
||||
* A Property Group is a list of values, separated from other property groups by a whitespace divider with an optional header
|
||||
*/
|
||||
export class PropertyGroup {
|
||||
private constructor(readonly data: PackagePropertyGroup) {}
|
||||
/**
|
||||
* Returns a new Property Group with the provided options
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
static of(options: {
|
||||
header: string | null
|
||||
values: (PropertyPage | PropertyString)[]
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
import { PackagePropertyPage } from "../types"
|
||||
import { PropertyGroup } from "./PropertyGroup"
|
||||
|
||||
/**
|
||||
* A Property Page will display to the user as a button with a name a description.
|
||||
* Clicking the button will take the user to a nested page displaying the provided
|
||||
* list of Property Groups
|
||||
*/
|
||||
export class PropertyPage {
|
||||
private constructor(readonly data: PackagePropertyPage) {}
|
||||
/**
|
||||
* Returns a new Property Page with the provided options
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
static of(options: {
|
||||
name: string
|
||||
description: string | null
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import { PackagePropertyString } from "../types"
|
||||
|
||||
/**
|
||||
* A Property String is an arbitrary string value to display to the user
|
||||
*/
|
||||
export class PropertyString {
|
||||
private constructor(readonly data: PackagePropertyString) {}
|
||||
static of(value: Omit<PackagePropertyString, "type" | "watch">) {
|
||||
/**
|
||||
* Returns a new Property String with the provided options
|
||||
* @param value
|
||||
* @returns
|
||||
*/
|
||||
static of(value: Omit<PackagePropertyString, "type">) {
|
||||
return new PropertyString({
|
||||
...value,
|
||||
type: "string",
|
||||
|
||||
Reference in New Issue
Block a user