Skip to content
Draft
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
9 changes: 9 additions & 0 deletions client/a8c-for-agencies/components/sidebar/header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { SidebarV2Header as SidebarHeader } from 'calypso/layout/sidebar-v2';
import { useSelector } from 'calypso/state';
import { getActiveAgency } from 'calypso/state/a8c-for-agencies/agency/selectors';
import A4ALogo, { LOGO_COLOR_SECONDARY_ALT } from '../../a4a-logo';
import ProfileDropdown from './profile-dropdown';

Expand All @@ -15,9 +17,16 @@ const AllSitesIcon = () => (
);

const Header = ( { withProfileDropdown }: Props ) => {
const agency = useSelector( getActiveAgency );

return (
<SidebarHeader className="a4a-sidebar__header">
<AllSitesIcon />
{ agency?.name && (
<span className="a4a-sidebar__agency-name" title={ agency.name }>
{ agency.name }
</span>
) }
{ withProfileDropdown && <ProfileDropdown /> }
</SidebarHeader>
);
Expand Down
12 changes: 12 additions & 0 deletions client/a8c-for-agencies/components/sidebar/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ $profile-dropdown-menu-height: 250px;
display: flex;
justify-content: space-between;
}

.a4a-sidebar__agency-name {
flex: 1 1 0;
min-width: 0;
max-width: 140px;
color: var(--color-sidebar-text);
font-size: 0.875rem;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.components-button .help-center__icon {
fill: var(--color-sidebar-text);
}
Expand Down
Loading