Documentation
¶
Index ¶
- Variables
- func BText(text string) nodx.Node
- func CardBox(params CardBoxParams) nodx.Node
- func CardBoxSimple(children ...nodx.Node) nodx.Node
- func CardBoxSimpleBgBase200(children ...nodx.Node) nodx.Node
- func CardBoxSimpleBgBase300(children ...nodx.Node) nodx.Node
- func ChangeThemeButton(params ChangeThemeButtonParams) nodx.Node
- func CopyButtonLg(textToCopy string) nodx.Node
- func CopyButtonMd(textToCopy string) nodx.Node
- func CopyButtonSm(textToCopy string) nodx.Node
- func EmptyResults(params EmptyResultsParams) nodx.Node
- func EmptyResultsTr(params EmptyResultsParams) nodx.Node
- func H1(children ...nodx.Node) nodx.Node
- func H1Text(text string) nodx.Node
- func H2(children ...nodx.Node) nodx.Node
- func H2Text(text string) nodx.Node
- func H3(children ...nodx.Node) nodx.Node
- func H3Text(text string) nodx.Node
- func H4(children ...nodx.Node) nodx.Node
- func H4Text(text string) nodx.Node
- func H5(children ...nodx.Node) nodx.Node
- func H5Text(text string) nodx.Node
- func H6(children ...nodx.Node) nodx.Node
- func H6Text(text string) nodx.Node
- func HealthStatusPing(testOk sql.NullBool, testError sql.NullString, lastTestAt sql.NullTime) nodx.Node
- func HelpButtonModal(params HelpButtonModalParams) nodx.Node
- func HxLoadingLg(id ...string) nodx.Node
- func HxLoadingMd(id ...string) nodx.Node
- func HxLoadingSm(id ...string) nodx.Node
- func InputControl(params InputControlParams) nodx.Node
- func IsActivePing(isActive bool) nodx.Node
- func Logotype() nodx.Node
- func OptionsDropdown(children ...nodx.Node) nodx.Node
- func OptionsDropdownA(children ...nodx.Node) nodx.Node
- func OptionsDropdownButton(children ...nodx.Node) nodx.Node
- func PGVersionSelectOptions(selectedVersion sql.NullString) nodx.Node
- func PText(text string) nodx.Node
- func Ping(color color) nodx.Node
- func PrettyDestinationName(isLocal bool, destinationName sql.NullString) nodx.Node
- func PrettyFileSize(size sql.NullInt64) nodx.Node
- func RenderableGroup(children []nodx.Node) nodx.Node
- func SelectControl(params SelectControlParams) nodx.Node
- func SkeletonTr(rows int) nodx.Node
- func SpanText(text string) nodx.Node
- func SpinnerContainerLg(height ...string) nodx.Node
- func SpinnerContainerMd(height ...string) nodx.Node
- func SpinnerContainerSm(height ...string) nodx.Node
- func SpinnerLg() nodx.Node
- func SpinnerMd() nodx.Node
- func SpinnerSm() nodx.Node
- func StarOnGithub(size size) nodx.Node
- func StatusBadge(status string) nodx.Node
- func SupportProjectAnchor(text string) nodx.Node
- func SupportProjectButton(size size) nodx.Node
- func SupportProjectSponsors() nodx.Node
- func TextareaControl(params TextareaControlParams) nodx.Node
- type CardBoxParams
- type ChangeThemeButtonParams
- type EmptyResultsParams
- type HelpButtonModalParams
- type InputControlParams
- type ModalParams
- type ModalResult
- type SelectControlParams
- type TextareaControlParams
Constants ¶
This section is empty.
Variables ¶
var ( SizeSm = size{"sm"} SizeMd = size{"md"} SizeLg = size{"lg"} ColorPrimary = color{"primary"} ColorSecondary = color{"secondary"} ColorAccent = color{"accent"} ColorNeutral = color{"neutral"} ColorInfo = color{"info"} ColorSuccess = color{"success"} ColorWarning = color{"warning"} ColorError = color{"error"} DropdownPositionTop = dropdownPosition{"top"} DropdownPositionBottom = dropdownPosition{"bottom"} DropdownPositionLeft = dropdownPosition{"left"} DropdownPositionRight = dropdownPosition{"right"} InputTypeText = inputType{"text"} InputTypePassword = inputType{"password"} InputTypeEmail = inputType{"email"} InputTypeNumber = inputType{"number"} InputTypeTel = inputType{"tel"} InputTypeUrl = inputType{"url"} )
Functions ¶
func BText ¶
BText is a convenience function to create a B element with a simple text node as its child.
func CardBox ¶
func CardBox(params CardBoxParams) nodx.Node
CardBox renders a card box with the given children.
func CardBoxSimple ¶
CardBoxSimple is the same as CardBox, but with a less verbose api and default props. It renders a card box with the given children.
func CardBoxSimpleBgBase200 ¶
CardBoxSimpleBgBase200 is the same as CardBox, but with a less verbose api and default props. It renders a card box with the given children.
func CardBoxSimpleBgBase300 ¶
CardBoxSimpleBgBase300 is the same as CardBox, but with a less verbose api and default props. It renders a card box with the given children.
func ChangeThemeButton ¶
func ChangeThemeButton(params ChangeThemeButtonParams) nodx.Node
func CopyButtonLg ¶
CopyButtonLg is a large copy button.
func CopyButtonMd ¶
CopyButtonMd is a medium copy button.
func CopyButtonSm ¶
CopyButtonSm is a small copy button.
func EmptyResults ¶
func EmptyResults(params EmptyResultsParams) nodx.Node
func EmptyResultsTr ¶
func EmptyResultsTr(params EmptyResultsParams) nodx.Node
func H1Text ¶
H1Text is a convenience function to create an H1 element with a simple text node as its child.
func H2Text ¶
H2Text is a convenience function to create an H2 element with a simple text node as its child.
func H3Text ¶
H3Text is a convenience function to create an H3 element with a simple text node as its child.
func H4Text ¶
H4Text is a convenience function to create an H4 element with a simple text node as its child.
func H5Text ¶
H5Text is a convenience function to create an H5 element with a simple text node as its child.
func H6Text ¶
H6Text is a convenience function to create an H6 element with a simple text node as its child.
func HealthStatusPing ¶
func HelpButtonModal ¶
func HelpButtonModal(params HelpButtonModalParams) nodx.Node
func HxLoadingLg ¶
HxLoadingLg returns a large loading indicator.
func HxLoadingMd ¶
HxLoadingMd returns a loading indicator.
func HxLoadingSm ¶
HxLoadingSm returns a small loading indicator.
func InputControl ¶
func InputControl(params InputControlParams) nodx.Node
func IsActivePing ¶
func PGVersionSelectOptions ¶
func PGVersionSelectOptions(selectedVersion sql.NullString) nodx.Node
func PText ¶
PText is a convenience function to create a P element with a simple text node as its child.
func PrettyDestinationName ¶
func PrettyDestinationName( isLocal bool, destinationName sql.NullString, ) nodx.Node
func PrettyFileSize ¶
PrettyFileSize pretty prints a file size (in bytes) to a human-readable format. If the size is not valid, it returns an empty string.
e.g. 1024 -> 1 KB
func RenderableGroup ¶
RenderableGroup renders a group of nodes without a parent element.
This is because nodx.Group() cannot be directly rendered and needs to be wrapped in a parent element.
func SelectControl ¶
func SelectControl(params SelectControlParams) nodx.Node
func SkeletonTr ¶
func SpanText ¶
SpanText is a convenience function to create a Span element with a simple text node as its child.
func SpinnerContainerLg ¶
func SpinnerContainerMd ¶
func SpinnerContainerSm ¶
func StarOnGithub ¶
func StatusBadge ¶
func SupportProjectAnchor ¶
func SupportProjectButton ¶
func SupportProjectSponsors ¶
func TextareaControl ¶
func TextareaControl(params TextareaControlParams) nodx.Node
Types ¶
type CardBoxParams ¶
type ChangeThemeButtonParams ¶
type ChangeThemeButtonParams struct {
Position dropdownPosition
AlignsToEnd bool
Size size
}
type EmptyResultsParams ¶
type HelpButtonModalParams ¶
type InputControlParams ¶
type ModalParams ¶
type ModalParams struct {
// ID is the ID of the modal dialog. If empty, a random ID will be generated.
ID string
// Content is the content of the modal dialog.
Content []nodx.Node
// Size is the size of the modal dialog.
// Can be "sm", "md", and "lg".
// The default is "md".
Size size
// Title is the title of the modal dialog.
// If you need more than a string, use TitleNode instead.
Title string
// TitleNode is the title of the modal dialog.
// If you need only a string, use Title instead.
TitleNode nodx.Node
// HTMXIndicator is an optional ID of an HTMX indicator that
// should be inserted in the modal header.
HTMXIndicator string
}
ModalParams are the props for the Modal component.
type ModalResult ¶
type ModalResult struct {
// HTML is the modal dialog nodx.
HTML nodx.Node
// OpenerAttr is the attribute to add to the element that opens the modal dialog.
OpenerAttr nodx.Node
}
ModalResult is the result of creating a modal dialog.
func SupportProjectModal ¶
func SupportProjectModal() ModalResult
type SelectControlParams ¶
Source Files
¶
- card_box.go
- change_theme_button.go
- copy_button.go
- empty_results.go
- enums.go
- help_button_modal.go
- hx_loading.go
- input_control.go
- logotype.go
- modal.go
- options_dropdown.go
- pg_version_select_options.go
- ping.go
- pretty_destination_name.go
- pretty_file_size.go
- renderable_group.go
- select_control.go
- skeleton.go
- spinner.go
- star_on_github.go
- status_badge.go
- support_project.go
- support_project_sponsors.go
- textarea_control.go
- typography.go