Comments (4)
Best way of handling it would be a classes
prop that allows you to pass in what css class you want.
<PanelGroup classes={{divider: 'my-divider', panel: 'whoopwhoop'}}/>
This works really well with css-modules too.
.divider {
background: blue;
}
import classes from './styles.css'
....
<PanelGroup classes={classes}/>
from react-panelgroup.
This is something I would like too, although for a slightly different reason.
If a panelWidth resize is set to "fixed", the cursor for the divider is still set to "row-resize" or "column-resize" depending on the direction.
Ideally, the cursor should not change to indicate that resize is possible when it is not.
However, having the ability to propagate our own styles or classes to each panel would enable us to solve this ourselves.
Perhaps something like;
<PanelGroup direction='column' borderColor: '#333' panelWidths={ [
{ size: 28, resize: 'fixed', className: 'example-fixed-panel' },
{ resize: 'dynamic' }]
}>
<div>Fixed Panel with no resize cursor on the divider</div>
<div>Dynamic Panel</div>
</PanelGroup>
from react-panelgroup.
bump, with the addition that the divider currently has style directly in the element. It'd be a lot better to have it defined in a separate CSS file, so that way it could be overwritten by my own css. as it stands, i think i'd have to use !important
or fork my own panel group.
from react-panelgroup.
Best way of handling it would be a
classes
prop that allows you to pass in what css class you want.<PanelGroup classes={{divider: 'my-divider', panel: 'whoopwhoop'}}/>
This works really well with css-modules too.
.divider { background: blue; }
import classes from './styles.css' .... <PanelGroup classes={classes}/>
Hi@JonDum, CSS/Styles sheet worked for color though not width, and trying to override the styles with jss and no luck. Any ideas?
import withStyles from '@material-ui/core/styles/withStyles';
import React from 'react';
import ReactPanelGroup from 'react-panelgroup';
// import classes from './styles.css';
const styles = {
divider: {
width: 3,
background: 'green !important',
'&:hover': 'pink',
},
};
const PanelGroup = ({ children, classes }) => {
return (
<ReactPanelGroup
classes={{
divider: classes.divider,
}}
>
{children}
</ReactPanelGroup>
);
};
export default withStyles(styles)(PanelGroup);
from react-panelgroup.
Related Issues (20)
- Support for TS typings? HOT 3
- Is it possible to know when 'dragging' is in progress? HOT 1
- Sizes don't match error HOT 2
- Unable to find node on an unmounted component error HOT 2
- Panel separator thickness HOT 1
- Don't understand the stretch property HOT 1
- Console warning componentWillReceiveProps HOT 1
- Scrolling within panels HOT 7
- Panels will not fill height of page HOT 1
- option to keep panel heights synchronized
- Getting : Warning: A string ref, "resizeObject", has been found within a strict mode tree HOT 1
- Expose defaults for panel widthss
- Option to avoid recursive resizing HOT 3
- How to import PanelGroup and Content in js code after npm install react-panelgroup?
- Changing direction programmatically causes resize function to stop working
- Please update to work with React > 17
- Application breaks when min width is set to > 155
- How to disable Neighbor-Aware Resizing ?
- Cannot read properties of undefined (reading 'style') when dynamically adding an additional panel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-panelgroup.