15 lines
265 B
Go
15 lines
265 B
Go
|
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
|
||
|
}
|