-
Notifications
You must be signed in to change notification settings - Fork 48
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
[Feature] Provide injection token for default values of component's input #80
Labels
enhancement
New feature or request
Comments
MGREMY
added a commit
that referenced
this issue
Nov 24, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Nov 30, 2024
MGREMY
added a commit
that referenced
this issue
Dec 11, 2024
## PR Checklist Please check if your PR fulfills the following requirements: <!--- [ ] Tests for the changes have been added (for bug fixes/features)--> - [x] Docs have been added/updated (for bug fixes/features) ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [x] Bugfix - [x] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build related changes - [ ] CI-related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## Issue Number <!-- Bugs and features must be linked to an issue. --> Issue Number: #80 #82 ## Does this PR introduce a breaking change? <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> - [ ] Yes - [x] No ## Other information <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a `FlowbiteThemeDirective` for managing application themes with local storage support. - Added support for dark mode customization and documentation. - New components and features for dropdowns, accordions, alerts, badges, breadcrumbs, buttons, modals, sidebars, and navigation bars with enhanced configurability through dependency injection. - **Documentation** - Updated documentation for dark mode, component customization, and theme management. - **Bug Fixes** - Removed redundant verification methods across various components to streamline functionality. - **Chores** - Added new files and updated paths for better module resolution in TypeScript. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MGREMY
pushed a commit
that referenced
this issue
Dec 11, 2024
# [1.1.0](https://github.com/themesberg/flowbite-angular/compare/[email protected]@v1.1.0) (2024-12-11) ### Bug Fixes * **dropdown:** set container's min-width ([a9e19d5](a9e19d5)) ### Features * **accordion:** add animation ([7e92417](7e92417)) * **accordion:** provide injection token for default input value [#80](#80) ([04f4d54](04f4d54)) * **alert:** add animation ([84d0c53](84d0c53)) * **alert:** provide injection token for default input value [#80](#80) ([da3ff4a](da3ff4a)) * **badge:** provide injection token for default input value [#80](#80) ([f7337d6](f7337d6)) * **breadcrumb:** provide injection token for default input value [#80](#80) ([f8b0f20](f8b0f20)) * **button:** provide injection token for default input value [#80](#80) ([9d8d700](9d8d700)) * **dark-theme-toggle:** provide injection token for default input value [#80](#80) ([f4c5854](f4c5854)) * **dropdown:** provide injection token for default input value [#80](#80) ([bbda81d](bbda81d)) * **dropdown:** use `viewChield()`, remove position calculation ([5394931](5394931)) * **dropdown:** use `viewChield()`, remove position calculation ([114c9d1](114c9d1)) * **dropdown:** use tailwind classes instead of @floating-ui/dom ([1d4c0dc](1d4c0dc)) * **dropdown:** use tailwind classes instead of @floating-ui/dom ([1f0b871](1f0b871)) * **indicator:** provide injection token for default input value [#80](#80) ([cbaca0f](cbaca0f)) * **indicator:** provide injection token for default input value [#80](#80) ([cdbb78c](cdbb78c)) * **modal:** provide injection token for default input value [#80](#80) ([4463716](4463716)) * **navbar:** add animation ([5df1c2d](5df1c2d)) * **navbar:** provide injection token for default input value [#80](#80) ([fab0fbb](fab0fbb)) * **scroll-top:** provide injection token for default input value [#80](#80) ([02b9e21](02b9e21)) * **sidebar:** provide injection token for default input value [#80](#80) ([6d57117](6d57117)) * **theme:** add clean api to access and modify the current application theme [#82](#82) ([906a894](906a894)) * **theme:** add signal based accessor to current theme [#82](#82) ([90807d3](90807d3))
Available in 1.1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
For each component, the default value of their inputs are hard coded. We need to provide a way for the user to change the default values.
Proposed solution
In each component file, add a new const
InjectionToken
In each component file, add a new method called
componentNameDefaultValueProvider
asIn each component, update the input definitions by providing the
inject()
result as their defaut valueIn the
initFlowbite()
method, populate thedefaultValueProvider
const by adding the component provider as followAnd then call it into the main
makeEnvironmentProviders()
methodAlternatives considered
No response
The text was updated successfully, but these errors were encountered: