UNPKG

@arnelirobles/rnxjs

Version:

Minimalist Vanilla JS component system with reactive data binding.

13 lines (10 loc) 381 B
import { createComponent } from '../../utils/createComponent.js'; export function FormGroup({ label = '', forId = '', children = '' }) { const template = () => ` <div class="mb-3"> ${label ? `<label class="form-label" for="${forId}">${label}</label>` : ''} <div data-slot></div> </div> `; return createComponent(template, { label, forId, children }); }