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(sidebar): add custom chevron icon to collapse #891

Merged

Conversation

rluders
Copy link
Collaborator

@rluders rluders commented Jul 31, 2023

Adds the chevronIcon and renderChevronIcon properties to Sidebar.Collapse component, allowing users to customize the chevron icon for collapsed sidebar items.

BREAKING CHANGE:

FlowbiteSidebarCollapseTheme signature changes:

label: {
    base: string;
-    icon: string;
+    icon: {
+      base: string;
+      open: FlowbiteBoolean;
+    };
}

Closes #888

@vercel
Copy link

vercel bot commented Jul 31, 2023

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

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 25, 2023 6:27pm

@rluders rluders requested a review from tulup-conner July 31, 2023 13:12
@rluders rluders force-pushed the feat/sidebar-collapse-custom-chevron branch from 6efcc00 to 5e7988f Compare July 31, 2023 17:41
@rluders rluders force-pushed the feat/sidebar-collapse-custom-chevron branch from 5e7988f to b39bfb8 Compare July 31, 2023 18:26
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch coverage: 99.72% and project coverage change: -0.03% ⚠️

Comparison is base (7461173) 99.54% compared to head (f80c27b) 99.52%.
Report is 54 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #891      +/-   ##
==========================================
- Coverage   99.54%   99.52%   -0.03%     
==========================================
  Files         163      167       +4     
  Lines        6621     6938     +317     
  Branches      401      419      +18     
==========================================
+ Hits         6591     6905     +314     
- Misses         30       33       +3     
Files Changed Coverage Δ
src/components/Toast/theme.ts 100.00% <ø> (ø)
src/components/Sidebar/SidebarCollapse.tsx 99.09% <94.11%> (-0.91%) ⬇️
src/components/Dropdown/Dropdown.tsx 99.24% <99.43%> (-0.76%) ⬇️
src/components/Badge/Badge.tsx 100.00% <100.00%> (ø)
src/components/Button/Button.tsx 100.00% <100.00%> (ø)
src/components/Button/ButtonBase.tsx 100.00% <100.00%> (ø)
src/components/Button/theme.ts 100.00% <100.00%> (ø)
src/components/Card/Card.tsx 100.00% <100.00%> (ø)
src/components/Carousel/Carousel.tsx 99.09% <100.00%> (+0.12%) ⬆️
src/components/DarkThemeToggle/DarkThemeToggle.tsx 100.00% <100.00%> (ø)
... and 19 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@tulup-conner tulup-conner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tulup-conner tulup-conner force-pushed the feat/sidebar-collapse-custom-chevron branch from b39bfb8 to f80c27b Compare August 25, 2023 18:26
@tulup-conner
Copy link
Collaborator

CodeQL is spinning indefinitely on this for some reason, so I'm bypassing protections

@tulup-conner tulup-conner merged commit d92c2cc into themesberg:main Aug 25, 2023
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.

Arrow icon (chevron) inside Sidebar.Collapse is not accessible via props or the flowbite theme
2 participants