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

CB-3990 removed big version of logo #2186

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions webapp/packages/core-blocks/src/layout/AppLogo.m.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.container {
height: 100%;
display: flex;
align-items: center;
padding: 0 14px;
cursor: pointer;
}

.logo {
height: 32px;
}
43 changes: 8 additions & 35 deletions webapp/packages/core-blocks/src/layout/AppLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,23 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import styled, { css, use } from 'reshadow';

import { IconOrImage } from '../IconOrImage';
import { s } from '../s';
import { useS } from '../useS';
import styles from './AppLogo.m.css';

const styles = css`
logo {
height: 100%;
display: flex;
align-items: center;
padding: 0 14px;
cursor: pointer;
}

IconOrImage {
height: 32px;
width: 154px;
&[|small] {
display: none;
}
}

@media only screen and (min-width: 480px) {
IconOrImage {
&[|primary] {
display: none;
}
&[|small] {
display: block;
width: auto;
}
}
}
`;

interface Props {
title: string;
onClick?: () => void;
}

export const AppLogo: React.FC<Props> = function AppLogo({ title, onClick }) {
return styled(styles)(
<logo title={title} onClick={onClick}>
<IconOrImage icon="/icons/logo.svg" {...use({ primary: true })} />
<IconOrImage icon="/icons/logo_sm.svg" {...use({ small: true })} />
</logo>,
const style = useS(styles);
return (
<div className={s(style, { container: true })} title={title} onClick={onClick}>
<IconOrImage className={s(style, { logo: true })} icon="/icons/logo_sm.svg" />
</div>
);
};
Loading