Skip to content

Commit

Permalink
Task: Increase help and settings box sizes (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
Onokaev authored May 24, 2022
1 parent 834c732 commit b046291
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/app/views/main-header/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Help = () => {
const calloutStyles: React.CSSProperties = {
overflowY: 'hidden'
}
const helpButtonStyles = mainHeaderStyles(currentTheme).iconButton;
const { iconButton: helpButtonStyles, tooltipStyles } = mainHeaderStyles(currentTheme);

const menuProperties = {
shouldFocusOnMount: true,
Expand All @@ -108,6 +108,7 @@ export const Help = () => {
content={translateMessage('Help')}
id={getId()}
calloutProps={{ gapSpace: 0 }}
styles={ tooltipStyles }
>
<IconButton
ariaLabel={translateMessage('Help')}
Expand Down
20 changes: 18 additions & 2 deletions src/app/views/main-header/MainHeader.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const mainHeaderStyles = (theme: ITheme) => {
},
feedbackIconAdjustmentStyles: {
position: 'relative' as 'relative',
right: '-6px',
top: '4px'
},
tenantStyles: {
Expand All @@ -32,7 +31,24 @@ export const mainHeaderStyles = (theme: ITheme) => {
width: '50px',
':hover': {
background: `${theme.palette.neutralLight} !important`
}
},
flexGrow: '1'
}
},
moreInformationStyles: {
flexGrow: 1,
flexShrink: 1,
flexBasis: '60px'
},
settingsContainerStyles: {
display: 'flex',
alignItems: 'stretch'
},
tooltipStyles: {
root: {
flexGrow: 1,
display: 'flex',
alignItems: 'stretch'
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/views/main-header/MainHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const MainHeader: React.FunctionComponent <MainHeaderProps> = (props: Mai
const mobileScreen = props.mobileScreen;
const currentTheme = getTheme();
const { rootStyles : itemAlignmentStackStyles, rightItemsStyles,
feedbackIconAdjustmentStyles, tenantStyles } = mainHeaderStyles(currentTheme);
feedbackIconAdjustmentStyles, tenantStyles, moreInformationStyles } = mainHeaderStyles(currentTheme);

return (
<Stack tokens={sectionStackTokens}>
Expand Down Expand Up @@ -98,9 +98,9 @@ export const MainHeader: React.FunctionComponent <MainHeaderProps> = (props: Mai
style={tenantStyles}
/>
}
<Settings />
<Help />
<span style={feedbackIconAdjustmentStyles}> <FeedbackButton /> </span>
<span style={ moreInformationStyles }> <Settings /> </span>
<span style={ moreInformationStyles }> <Help /> </span>
<span style={ feedbackIconAdjustmentStyles }> <FeedbackButton /> </span>
<Authentication />
</Stack>
</Stack>
Expand Down
6 changes: 4 additions & 2 deletions src/app/views/main-header/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
overflowY: 'hidden'
}

const settingsButtonStyles = mainHeaderStyles(currentTheme).iconButton;
const { iconButton : settingsButtonStyles, settingsContainerStyles,
tooltipStyles} = mainHeaderStyles(currentTheme);

const menuProperties = {
shouldFocusOnMount: true,
Expand All @@ -104,11 +105,12 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
};

return (
<div>
<div style={ settingsContainerStyles }>
<TooltipHost
content={translateMessage('Settings')}
id={getId()}
calloutProps={{ gapSpace: 0 }}
styles={ tooltipStyles }
>
<IconButton
ariaLabel={translateMessage('Settings')}
Expand Down

0 comments on commit b046291

Please sign in to comment.