themesberg / themesberg/flowbite

Prefixes in components

Open
#132 21 comments 4 reactions 1 assignee View on GitHub

@zoltanszogyenyi is already working on this.

Since Jul 6, 2022.

bug enhancement
Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Tooltip and Dropdown components don't work when tailwindcss prefix is set.

To Reproduce
Steps to reproduce the behavior:

  1. Setup prefix in the tailwind.config.js:
module.exports = {
  prefix: "tw-",
  ...
}
  1. Create a tooltip component https://flowbite.com/docs/components/tooltips/
  2. Add prefixes to default styles
  3. Launch your app and see tooltip not working

Expected behavior
Components support custom prefixes

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 100.0.4896.75

Additional context
Components have default tailwindcss classes hardcoded: https://github.com/themesberg/flowbite/blob/main/src/components/tooltip.js#L70 and there is no prefix injection there

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.