WASM reactive UI framework for Go: - reactive/ - Signal[T], Effect, Runtime - ui/ - Button, Text, Input, View, Canvas, SVG components - navigation/ - Router, guards, history management - auth/ - OIDC client for WASM applications - host/ - Static file server Extracted from arcadia as open-source component. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
ui/utils.go
Normal file
10
ui/utils.go
Normal file
@@ -0,0 +1,10 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package ui
|
||||
|
||||
import "fmt"
|
||||
|
||||
// FormatPx formats a float as a CSS pixel value
|
||||
func FormatPx(v float64) string {
|
||||
return fmt.Sprintf("%.0fpx", v)
|
||||
}
|
||||
Reference in New Issue
Block a user