def render(self): return (Elem( 'div', { 'class': 'col-md-6', }, ' ', Elem( 'label', { 'class': 'sr-only', }, 'Email', ), ' ', Elem( 'input', { 'type': 'text', 'id': 'form_text_input', 'class': 'form-control-plaintext', 'placeholder': 'Enter a to do', }, ), ' ', Elem(SubmitButton), ' ', ))
def render(self): return (Elem( 'div', { 'class': 'col-md-6', }, ' ', Elem(ToDoList), ' ', ))
def render(self): self.prerender() if self.to_do_items: todos = list(map(self.to_link, self.to_do_items)) return (Elem( 'ul', { 'class': 'list-group', }, ' ', todos, ' ', )) return (Elem('ul'))
def render(self): return Elem( 'ul', { 'className': self.props['className'], }, )
def render(self): return Elem( 'li', { 'class': self.props['class'], }, self.props['text'], )
def todo_item(self): text = 'get milk' return Elem( ToDoItem, { 'text': text, }, )
def to_link(self, to_do_item): return (Elem( ToDoItem, { 'item': to_do_item['text'], }, ))
def todo_list(self): className = 'todo_list' return Elem( ToDoList, { 'className': className, }, )
def render(self): return (Elem( 'input', { 'type': 'button', 'id': 'form_submit', 'class': 'btn btn-primary mb-2', 'value': 'Add', }, ))
def render(self): return (Elem( 'input', { 'type': 'button', 'id': 'GET_button', 'class': 'btn btn-primary mb-2', 'value': 'GET', }, ))
def render(self): return (Elem( 'input', { 'type': 'button', 'onclick': 'print()', 'id': 'print_button', 'class': 'btn btn-primary mb-2', 'value': 'Print', }, ))
def render(self): item = self.props['item'] return (Elem( 'li', { 'class': 'list-group-item', }, ' ', item, ' ', ))
def app(): return (Elem( 'div', { 'class': 'container-fluid', }, ' ', Elem( 'div', { 'class': 'row', }, ' ', Elem(ToDoForm), ' ', Elem(ToDoContainer), ' ', Elem(PrintButton), ' ', Elem(GETButton), ' ', ), ' ', ))