themesberg / themesberg/flowbite-react
Floating Label component refinament
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Summary
I detected a few issues with FloatingLabel component that needs to be addressed:
-
General component export is missing here:
https://github.com/themesberg/flowbite-react/blob/main/src/components/index.ts -
Component theme type is wrong:
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/Flowbite/FlowbiteTheme.ts#L1 -
Internal component export is wrong:
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/FloatingLabel/index.ts#L1 -
Theme is using any - it should be an interface
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/FloatingLabel/FloatingLabel.tsx#L8 -
Component color must be
keys FlowbiteColors
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/FloatingLabel/FloatingLabel.tsx#L19 -
Default color must be defined here, since it is optional
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/FloatingLabel/FloatingLabel.tsx#L31
So, this line is nonsense:
https://github.com/themesberg/flowbite-react/blob/9e5a4a0d2d8d01fc958a5426949b88911182f23a/src/components/FloatingLabel/FloatingLabel.tsx#L45
Context
What are you trying to accomplish? How is your use case affected by not having this feature?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/components/index.ts, src/components/Flowbite/FlowbiteTheme.ts, and the files under src/components/FloatingLabel/ referenced in the issue. Check each listed export and type concern against the component's current definitions; done means the component is exported correctly and its theme, color, and optional default-color definitions match the requested types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, tailwindcss, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100