Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1086 - enable custom logos to be larger than 24px #1090

Merged
merged 2 commits into from
Jun 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/mainAppBar/mainAppBar.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const styles = (theme: Theme): StyleRules =>
padding: 4,
margin: theme.spacing(1),
'& img': {
height: 24,
maxHeight: `calc(${
(theme as UKRITheme).mainAppBarHeight
} - 2 * 4px - 2 * ${theme.spacing(1)}px)`,
louise-davies marked this conversation as resolved.
Show resolved Hide resolved
},
},
button: {
Expand Down Expand Up @@ -213,6 +215,9 @@ const MainAppBar = (props: CombinedMainAppBarProps): React.ReactElement => {
>
<img
src={props.logo ? props.logo : defaultLogo}
// if using default logo use 24px, if using custom logo then don't set height
// custom logos must be sized to fit or will default to the max-height set in the top styling
style={props.logo ? {} : { height: '24px' }}
alt={getString(props.res, 'title')}
/>
</Button>
Expand Down