swordev / suid

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

Checkbox doesn't display label #294

Closed edoelk closed 4 months ago

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

Any ideas? Thank you.

urish commented 4 months ago

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

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