github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/examples/immtodoapp/entry.go (about)

     1  package immtodoapp
     2  
     3  import "myitcv.io/react"
     4  
     5  type EntryDef struct {
     6  	react.ComponentDef
     7  }
     8  
     9  type EntryProps struct {
    10  	Text string
    11  }
    12  
    13  func Entry(s string) *EntryElem {
    14  	return buildEntryElem(EntryProps{Text: s})
    15  }
    16  
    17  func (e EntryDef) Render() *react.LiElem {
    18  	return react.Li(nil, react.S(e.Props().Text))
    19  }
    20  
    21  func (e EntryDef) RendersLi(*react.LiElem) {}