Customise Components
Through defaultStlyes static prop
defaultStlyes static propimport React from 'react';
import { Card } from '@bluebase/components';
export class ThemedCard extends React.Component {
static defaultStyles = {
'root': {
backgroundColor: 'blue'
},
'hover': {
backgroundColor: 'green'
}
}
render() {
const { styles, isHovering } = this.props;
return (<Card style={isHovering ? styles.hover : styles.root} />);
}
}Priority
Use When
Through Component Registry
When registering a new component
Overriding styles of an existing component.
Priority
Use When
Through theme
Through styles prop
styles propComponent Styles Structure
Example
Last updated