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

Listgroup #1143

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Listgroup #1143

merged 4 commits into from
Nov 3, 2023

Conversation

jjagielka
Copy link
Contributor

@jjagielka jjagielka commented Nov 3, 2023

Closes #1111

πŸ“‘ Description

Adds attrs parameter to ListGroupItemType allowing passing attributes to <a> and <button> elements in ListgroupItems.

You can pass extra properties to the <a> element by setting the attrs atrribute in the items list.

<script>
  import { Listgroup } from 'flowbite-svelte';
  let links = [
    { name: 'Accordions', href: '/docs/components/accordion', current: true },
    { name: 'Alerts', href: '/docs/components/alerts' },
    { name: 'Badges', href: '/docs/components/badges' },
    { name: 'Breadcrumbs', href: '/docs/components/breadcrumbs', attrs: {target: '_blank'} }
  ];
</script>

<Listgroup active items={links} let:item class="w-48">
  {item.name}
</Listgroup>

Status

  • Not Completed
  • Completed

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • I have checked the page with https://validator.unl.edu/
  • All the tests have passed
  • My pull request is based on the latest commit (not the npm version).

β„Ή Additional Information

Copy link

stackblitz bot commented Nov 3, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Nov 3, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
flowbite-svelte βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 3, 2023 9:13am
flowbite-svelte-update βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 3, 2023 9:13am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support target and rel in ListGroupItem
2 participants