Comments (4)
one more note, I am using the version 1.8.4 of the library and consequent 3.4.1 of the style library since this project still use React 15.
from react-tabtab.
I have exactly same problem.
I think problem is in this line:
${props => props.active && !props.vertical ?
` border-bottom: 2px solid #f6b2b5;` : null}
&:hover {
background-color: transparent;
}`
from react-tabtab.
@kapilpipaliya I don't this so, I dug in the Tabs and Tab components a bit and I can see there is a style kind of hardcoded in the component itself used if the CustomTabStyle is undefined, that is using white for the background-color.
As you can see I changed the background color in all the custom styles to have a light blue or whatever (did not really care, anything different than white) but still I can see the white when this render.
from react-tabtab.
Found the problem.
I was using export default and this was causing an issue underneath since the TabList component was looking for the customStyle.Tab component where the style was defined, but this was under customStyle.default.Tab, so the previous resulted with an undefined component and was taking the hardcoded style.
Code changed
var styled = require('react-tabtab').styled;
let {TabListStyle, ActionButtonStyle, TabStyle, PanelStyle} = styled;
TabListStyle = TabListStyle.extend`background-color: #009988;`;
TabStyle = TabStyle.extend`background-color: #009988;transition: color .28s ease;`;
ActionButtonStyle = ActionButtonStyle.extend`
background-color: #009988; border-radius: 0; &:hover { background-color: #eee; }`;
PanelStyle = PanelStyle.extend`
background-color: #009988;
border-left: 1px solid rgba(0,0,0,0.12);
border-right: 1px solid rgba(0,0,0,0.12);
border-bottom: 1px solid rgba(0,0,0,0.12);
padding: 30px 30px;
transition: box-shadow .25s, -webkit-box-shadow .25s;
border-radius: 2px;
`;
// need to follow this object naming
module.exports = {
TabList: TabListStyle,
ActionButton: ActionButtonStyle,
Tab: TabStyle,
Panel: PanelStyle
};
@kapilpipaliya I hope this will help you, cheers.
from react-tabtab.
Related Issues (20)
- Make your own style HOT 3
- Drag Tabs between multiple strips
- React router
- custom styled is not function HOT 2
- Feature request: Drop down as child of tab.
- Feature - add classname prop to various components HOT 1
- Closing a modal with no tabs in TabList results in an error
- Default tabs show buttons between them HOT 2
- Cannot use custom style as way of the documentation
- Drag Tabs with close button issue on windows HOT 2
- Object styled is not a function HOT 3
- rtl support HOT 1
- Close button style doesn't match example / no way to modify with props
- Button Issues
- Support Typescript - create declaration file HOT 3
- Tab broken on page reload in Next js 10
- Update to React 17? HOT 1
- RTL support
- Custom Modal Component and Content
- Cannot figure out a way to change the styles of the tab when dragging
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-tabtab.