Merge pull request #10554 from saan800/tab_class_name

Add name for BackstageTab styles
This commit is contained in:
Ben Lambert
2022-03-31 20:04:59 +02:00
committed by GitHub
2 changed files with 27 additions and 16 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Adding a name to the core-components Tab styles so can customise in the theme settings
@@ -37,24 +37,30 @@ const tabMarginLeft = (isFirstNav: boolean, isFirstIndex: boolean) => {
return '40px';
};
const useStyles = makeStyles<BackstageTheme, StyledTabProps>(theme => ({
root: {
textTransform: 'none',
height: '64px',
fontWeight: theme.typography.fontWeightBold,
fontSize: theme.typography.pxToRem(13),
color: theme.palette.textSubtle,
marginLeft: props =>
tabMarginLeft(props.isFirstNav as boolean, props.isFirstIndex as boolean),
width: '130px',
minWidth: '130px',
'&:hover': {
outline: 'none',
backgroundColor: 'transparent',
const useStyles = makeStyles<BackstageTheme, StyledTabProps>(
theme => ({
root: {
textTransform: 'none',
height: '64px',
fontWeight: theme.typography.fontWeightBold,
fontSize: theme.typography.pxToRem(13),
color: theme.palette.textSubtle,
marginLeft: props =>
tabMarginLeft(
props.isFirstNav as boolean,
props.isFirstIndex as boolean,
),
width: '130px',
minWidth: '130px',
'&:hover': {
outline: 'none',
backgroundColor: 'transparent',
color: theme.palette.textSubtle,
},
},
},
}));
}),
{ name: 'BackstageTab' },
);
export const StyledTab = (props: StyledTabProps) => {
const classes = useStyles(props);