swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
660 stars 47 forks source link

Checkbox doesn't display label #294

Closed edoelk closed 3 weeks ago

edoelk commented 2 months ago
  <Checkbox
    checked={!hasExpirationDate()}
    onChange={(event) => setHasExpirationDate(!hasExpirationDate()) }
    label={'This label is not displayed!'} />

Any ideas? Thank you.

urish commented 3 weeks ago

I usually wrap it in a FormControlLabel, e.g.

<FormControlLabel
      control={
            <Checkbox
                checked={!hasExpirationDate()}
                onChange={(event) => setHasExpirationDate(!hasExpirationDate()) }
            />
      }
      label="This label is displayed" />