public override ReactElement Render()
        {
            return(DOM.Div
                   (
                       new Attributes {
            },

                       new MessageEcho(new MessageEcho.Props
            {
                OnAdded = text =>
                {
                    var nextState = state;
                    nextState.Messages =
                        nextState.Messages
                        .Concat <string>(new string[] { text })
                        .ToArray();

                    SetState(nextState);
                }
            }),

                       DOM.UL
                       (
                           state.Messages.Select(msg => DOM.Li(msg))
                       )
                   ));
        }
Example #2
0
 public override ReactElement Render()
 {
     return(DOM.OL(new OListAttributes {
         ClassName = props.ClassName.ToNullableString()
     },
                   DOM.Li(null, GetLink("Home", props.Navigator.Home(), className: new ClassName("home"))),
                   DOM.Li(null,
                          GetLink("Accommodation", props.Navigator.Accommodation()),
                          DOM.OL(null,
                                 DOM.Li(null, GetLink("B&Bs", props.Navigator.Accommodation(new NonBlankTrimmedString("BedAndBreakfast")))),
                                 DOM.Li(null, GetLink("Hotels", props.Navigator.Accommodation(new NonBlankTrimmedString("Hotels")))),
                                 DOM.Li(null, GetLink("Self Catering", props.Navigator.Accommodation(new NonBlankTrimmedString("SelfCatering"))))
                                 )
                          )
                   ));
 }