diff --git a/src/components/logo/logo.scss b/src/components/logo/logo.scss index 9b05ac45..4586c52f 100644 --- a/src/components/logo/logo.scss +++ b/src/components/logo/logo.scss @@ -1,14 +1,15 @@ .mykn-logo { display: inline-block; - font-size: 0; + height: 34px; + max-width: 100%; - &__image { - height: 100%; - max-width: 155px; - object-fit: contain; - overflow: visible; - width: 100%; + &--abbreviated { + height: auto; + } + + &--variant-contrast { + --page-color-logo: var(--page-color-primary-contrast); } & &__handle { @@ -16,6 +17,13 @@ var(--animation-timing-function); } + &__image { + height: 100%; + object-fit: contain; + overflow: visible; + width: 100%; + } + &[href]:hover &__handle--left, &[href]:focus &__handle--left { transform: translateX(-2px); @@ -34,11 +42,11 @@ transform: translateX(-2px); } - &--variant-compact &__text--a, - &--variant-compact &__text--y, - &--variant-compact &__text--k, - &--variant-compact &__text--i, - &--variant-compact &__text--n { - display: none; + &--abbreviated &__text--a, + &--abbreviated &__text--y, + &--abbreviated &__text--k, + &--abbreviated &__text--i, + &--abbreviated &__text--n { + opacity: 0; } } diff --git a/src/components/logo/logo.tsx b/src/components/logo/logo.tsx index 15e87823..96a67893 100644 --- a/src/components/logo/logo.tsx +++ b/src/components/logo/logo.tsx @@ -6,6 +6,9 @@ import { useIntl } from "../../lib/i18n/useIntl"; import "./logo.scss"; export type LogoProps = { + /** Whether to show the logo with a single letter ("M") instead of the full brand name ("MAYKIN"). */ + abbreviated?: boolean; + /** If set, provide a link. */ href?: string; @@ -16,7 +19,7 @@ export type LogoProps = { hrefLabel?: string; /** Logo variant. */ - variant?: "normal" | "compact"; + variant?: "normal" | "contrast"; /** Gets passed as props. */ [index: string]: unknown; @@ -29,13 +32,14 @@ export type LogoProps = { * @constructor */ export const Logo: React.FC = ({ + abbreviated = false, label, href, hrefLabel, variant = "normal", ...props }) => { - const viewBoxWidth = variant === "normal" ? 122 : 47; + const viewBoxWidth = abbreviated ? 47 : 122; const context = { href: href || "", }; @@ -69,6 +73,7 @@ export const Logo: React.FC = ({ = ({ fill="#00bfcb" d="M6.32,26.41a4.27,4.27,0,0,1-2.26-.53,3.82,3.82,0,0,1-1.33-1.35,4.91,4.91,0,0,1-.63-1.78,12.47,12.47,0,0,1-.16-1.89V17.8a6.7,6.7,0,0,0-.1-1.2,3.56,3.56,0,0,0-.3-1A1.87,1.87,0,0,0,1,14.92a1.15,1.15,0,0,0-.74-.26H0V11.8H.29A1.14,1.14,0,0,0,1,11.55a1.91,1.91,0,0,0,.51-.69,3.56,3.56,0,0,0,.3-1,6.62,6.62,0,0,0,.1-1.2V5.54A12.54,12.54,0,0,1,2.1,3.67a5,5,0,0,1,.63-1.8A3.79,3.79,0,0,1,4.06.53,4.27,4.27,0,0,1,6.32,0H7.8V2.51H6.57a1.74,1.74,0,0,0-1.05.3,2,2,0,0,0-.63.78,2.92,2.92,0,0,0-.3,1,9.39,9.39,0,0,0-.07,1.19V8.94a9.89,9.89,0,0,1-.28,2.38A3.58,3.58,0,0,1,3,13.23a3.71,3.71,0,0,1,1.27,1.95,9.62,9.62,0,0,1,.28,2.34v3.06a9.23,9.23,0,0,0,.07,1.18,3,3,0,0,0,.3,1.06,2.06,2.06,0,0,0,.63.77,1.68,1.68,0,0,0,1.05.3H7.8v2.52Z" /> - + + + & { - align-self: flex-end; + .mykn-logo { + width: 32px; } } diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index 9b710b78..ea2b0375 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -10,17 +10,19 @@ export type NavbarProps = ToolbarProps; */ export const Navbar: React.FC = ({ children, ...props }) => { return ( - - {children} - +
+ + {children} + +
); }; diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index 1d5f764d..a3b7aa58 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -95,9 +95,7 @@ export const Sidebar: React.FC = ({ const _logo = slotLogo || CustomLogo || ( );