Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow markup in Input labels #583

Open
igorsantos07 opened this issue Dec 10, 2023 · 0 comments
Open

Allow markup in Input labels #583

igorsantos07 opened this issue Dec 10, 2023 · 0 comments
Labels
Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Bug Something isn't working Type: Proposal Issue or pull requests contains a new proposal

Comments

@igorsantos07
Copy link

igorsantos07 commented Dec 10, 2023

In short, the Input label should accept either the usual label prop or also a slot named label, so we can use markup inside the label.

<Input type="switch" bind:checked={doomed}>
  <svelte:fragment slot="label">
    I agree with the <a href="/boring-terms">Terms & Conditions</a> without reading them
  </svelte:fragment>
</Input>

Also, to avoid spamming the repo with issues: <Label check/> yields class="form-label form-label-check", where the first class is unnecessary and creates extra bottom-margin.

@igorsantos07 igorsantos07 changed the title Allow elements in Input labels Allow markup in Input labels Dec 10, 2023
@dysfunc dysfunc added Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Proposal Issue or pull requests contains a new proposal Type: Bug Something isn't working labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Bug Something isn't working Type: Proposal Issue or pull requests contains a new proposal
Projects
None yet
Development

No branches or pull requests

2 participants