page

package
v0.0.0-...-786626a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner(bannerRef react.ValueRef[BannerHandle], onRun, onFormat, onShare, onSnippetSelected react.Func) *react.Element

func CodeBox

func CodeBox(codeBoxRef react.ValueRef[CodeBoxHandle], onCodeChange, onUserChange, onSave, onEscape react.Func) *react.Element
func DropDown(id, className string, items []any, selected any, onSelect react.Func) *react.Element

func LineNumbers

func LineNumbers(lineNumsRef react.Ref, lineCount int, errorLines []int) *react.Element

func NoopOutput

func NoopOutput() common.Output

func OnceValue

func OnceValue[T any](f func() T) func() T

TODO(grantnelson-wf): Remove when we've reached go1.21

func OutputBox

func OutputBox(outputRef react.ValueRef[common.Output], onErrorLine react.Func) *react.Element

OutputBox creates a box React element for displaying output strings and errors.

func Playground

func Playground() *react.Element

func ToggleBox

func ToggleBox(id, title, label string, checked bool, setChecked react.Func) *react.Element

Types

type BannerHandle

type BannerHandle interface {
	Focus()
	FormatImports() bool
	SetVersion(version string)
	ShareHash() string
	SetShareHash(hash string)
}

func NoopBannerHandle

func NoopBannerHandle() BannerHandle

type CodeBoxHandle

type CodeBoxHandle interface {
	common.CodeBox

	FileName() string
	SetFileName(fileName string)

	SetErrorLines(lines []int)
}

func NoopCodeBoxHandle

func NoopCodeBoxHandle() CodeBoxHandle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL