Extend group style from sidebars to horizontal lines
See original GitHub issueNew developer here, I am able to style the left and right sidebars, how do you extend this to the middle of the calendar? Thanks
groupRenderer = ({group}) => {
let bgColor = 'white'
if (group.root == true) {
bgColor = 'lightgray'
}
return (
<div style={{backgroundColor:bgColor}}></div>
)
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Horizontal Line Styling on Each Side of Titles - Stack Overflow
In the blog above, titles in the sidebar, and the 'share this article' title has the desired effect that I am looking for,...
Read more >CSS Sidebars: A Beginner's Guide - HubSpot Blog
Learn how to code your own website sidebar using CSS and HTML. We'll explain static, fixed, sticky, grid, and collapsible sidebars and how ......
Read more >The Divi Sidebar Module | Elegant Themes Documentation
The “insert module” area represents your vertical sidebar. This is where you will enter the Sidebar Module. You can add as many modules...
Read more >How To Style the HR Element with CSS - W3Schools
Learn how to style an hr element with CSS. How To Style HR. Horizontal Line. You can use the border property to style...
Read more >Add borders and rules (lines) in Pages on Mac - Apple Support
Click the Style tab at the top of the sidebar on the right, then click the pop-up menu to the right of Border,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Ilaiwi I thought the groupRenderer could only affect the content in the sidebar? Here, we’re trying to style the areas in
.rct-scroll
or perhaps.rct-horizontal-lines
. Can groupRenderer modify those?I attempted to implement consistent row coloring across groups in the sidebar and through the timeline scroll area in this codesandbox in case it might help @capt-obvious or anyone else to settle this question.
For the demo, I apply a “highlight” class (provides the bright green background) to groups whose titles include the letter ‘e’ (could use any criteria, of course) The same class is applied to group headers in the
groupRenderer
. Then I add styling for that class instyle.css
.If anyone has a chance to look at my sandbox (maybe @perfectstrong or @Ilaiwi?), I’m curious if there’s a better way to do this.
Seems like it might be helpful for the classNames returned from
horizontalLineClassNamesForGroup
to be applied to the Sidebar group rows as well. (Right now, I have to override some rct styles to get the custom rendered group to fill the entire sidebar because I don’t know of a way to apply a className to the sidebar div with classNamesrct-sidebar-row rct-sidebar-row-[even|odd]
.)Applying those classNames to the Sidebar rows could look like this: https://github.com/trevdor/react-calendar-timeline/pull/1/files#diff-d3d66df219d3e1cc2a8b662759fa30adR64