naive/textview_darwin.go

15 lines
265 B
Go
Raw Permalink Normal View History

2025-01-20 07:34:39 +01:00
package naive
import (
"github.com/progrium/darwinkit/macos/appkit"
)
func (tv TextView) toNative() appkit.IView {
ntv := appkit.NewLabel(tv.Content.Value())
if eff, ok := tv.Content.(*Effect[string]); ok {
eff.OnChange(ntv.SetStringValue)
}
return ntv
}