field function
A labelled form field wrapping input, with an optional hint.
Implementation
web.HTMLElement field(String label, web.HTMLElement input, {String? hint}) =>
el(
'div',
classes: 'field',
children: [
el('label', text: label, attrs: {'for': input.id}),
input,
if (hint != null) el('div', classes: 'hint', text: hint),
],
);