gordonbrander / spellcaster

Reactive signals UI library
MIT License
57 stars 2 forks source link

Change component signature #55

Closed gordonbrander closed 3 months ago

gordonbrander commented 3 months ago

Lit uses styles and render. This leaves the variable names html and css free for tagged template literals. We may want to consider doing the same for ergonomics.

type ComponentProps<T> = {
  tag: string,
  styles: () => Array<CSSStyleSheet>,
  render: (props: T) => HTMLElement,
}