MCPcopy Create free account
hub / github.com/angular-rust/yew-components / view

Method view

src/datatable.rs:79–116  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

77 }
78
79 fn view(&self) -> Html {
80 html! {
81 <div class="mdc-data-table">
82 <div class="mdc-data-table__table-container">
83 <table class="mdc-data-table__table" aria-label="Dessert calories">
84 <thead>
85 <tr class="mdc-data-table__header-row">
86 <th class="mdc-data-table__header-cell" role="columnheader" scope="col">{ "Dessert" }</th>
87 <th class="mdc-data-table__header-cell mdc-data-table__header-cell--numeric" role="columnheader" scope="col">{ "Carbs (g)" }</th>
88 <th class="mdc-data-table__header-cell mdc-data-table__header-cell--numeric" role="columnheader" scope="col">{ "Protein (g)" }</th>
89 <th class="mdc-data-table__header-cell" role="columnheader" scope="col">{ "Comments" }</th>
90 </tr>
91 </thead>
92 <tbody class="mdc-data-table__content">
93 <tr class="mdc-data-table__row">
94 <th class="mdc-data-table__cell" scope="row">{ "Frozen yogurt" }</th>
95 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "24" }</td>
96 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "4.0" }</td>
97 <td class="mdc-data-table__cell">{ "Super tasty" }</td>
98 </tr>
99 <tr class="mdc-data-table__row">
100 <th class="mdc-data-table__cell" scope="row">{ "Ice cream sandwich" }</th>
101 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "37" }</td>
102 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "4.33333333333" }</td>
103 <td class="mdc-data-table__cell">{ "I like ice cream more" }</td>
104 </tr>
105 <tr class="mdc-data-table__row">
106 <th class="mdc-data-table__cell" scope="row">{ "Eclair" }</th>
107 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "24" }</td>
108 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">{ "6.0" }</td>
109 <td class="mdc-data-table__cell">{ "New filing flavor" }</td>
110 </tr>
111 </tbody>
112 </table>
113 </div>
114 </div>
115 }
116 }
117}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected