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

feat: mdsvexamples #300

Merged
merged 3 commits into from
Sep 19, 2022
Merged

feat: mdsvexamples #300

merged 3 commits into from
Sep 19, 2022

Conversation

jjagielka
Copy link
Contributor

📑 Description

Another attempt to add mdsvexamples to the project.

  • no need to duplicate code and example
  • import can now be flowbite-svelte
  • mdsvexample workaround with class not needed anymore
  • alert.md shows the advantage of that PR

✅ 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
  • All the tests have passed
  • My pull request is based on the latest commit (not the npm version).

ℹ Additional Information

@vercel
Copy link

vercel bot commented Sep 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
flowbite-svelte ✅ Ready (Inspect) Visit Preview Sep 18, 2022 at 8:07AM (UTC)
flowbite-svelte-update ✅ Ready (Inspect) Visit Preview Sep 18, 2022 at 8:07AM (UTC)

@shinokada
Copy link
Collaborator

Errors are:
image

@jjagielka
Copy link
Contributor Author

jjagielka commented Sep 18, 2022

Corrected. Seems it's finally work!

@shinokada
Copy link
Collaborator

shinokada commented Sep 18, 2022

The first alert has script tag.

image

But the second one doesn't.

image

I tried it with avatar page and the first one doesn't have the script tag.

image

```svelte example class="flex flex-col gap-4" hideScript
<script>
  import {Avatar} from 'flowbite-svelte'
</script>
<Avatar src="/images/profile-picture-2.webp" border/>
<Avatar src="/images/profile-picture-2.webp" border class="ring-red-400 dark:ring-red-300"/>

So will it have the script tag or not??

@shinokada
Copy link
Collaborator

shinokada commented Sep 18, 2022

Ok, I got it. the key is hideScript.

@jjagielka
Copy link
Contributor Author

Yes. We can hide the <script> if it repeats on all the examples.

@shinokada
Copy link
Collaborator

Avatar User Dropdown is not working.

```svelte example class="flex justify-center h-96" 
<script>
  import {Avatar, Dropdown, DropdownHeader, DropdownItem} from 'flowbite-svelte'
</script>

  <Avatar id="user-drop" src="/images/profile-picture-3.webp" dot={{color:'bg-green-400'}} />
  <Dropdown triggeredBy="#user-drop">
    <DropdownHeader>
      <span class="block text-sm"> Bonnie Green </span>
      <span class="block truncate text-sm font-medium"> name@flowbite.com </span>
    </DropdownHeader>
    <DropdownItem>Dashboard</DropdownItem>
    <DropdownItem>Settings</DropdownItem>
    <DropdownItem>Earnings</DropdownItem>
    <DropdownDivider />
    <DropdownItem>Sign out</DropdownItem>
  </Dropdown>

@jjagielka
Copy link
Contributor Author

You've forgot to add DropdownDivider to script section.

@shinokada
Copy link
Collaborator

shinokada commented Sep 18, 2022

Thanks. It opens but doesn't close on my localhost. Build/preview works though.

@shinokada shinokada merged commit 356e4f3 into themesberg:main Sep 19, 2022
@shinokada
Copy link
Collaborator

I updated all pages using this PR.
Thanks.

@jjagielka jjagielka deleted the examples branch September 19, 2022 14:34
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.

None yet

2 participants