Skip to content

Commit

Permalink
Update missing styles by removing the styling as dropdown link
Browse files Browse the repository at this point in the history
  • Loading branch information
aralovelace committed Jul 17, 2024
1 parent 073700a commit 1612894
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/core/MeganavItemsSignedIn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React from "react";

import MeganavControl from "./MeganavControl";
import MeganavSearch from "./MeganavSearch";
import { AbsUrl, MeganavSessionState, MeganavTheme } from "./Meganav";

Expand All @@ -10,30 +8,24 @@ type MeganavItemsSignedIn = {
absUrl: AbsUrl;
};

const truncate = (string, length) => {
const truncate = (string: string, length: number) => {
return string?.length && string.length > length
? `${string.slice(0, length - 1)}…`
: string;
};

const MeganavItemsSignedIn = ({
sessionState,
theme,
absUrl,
}: MeganavItemsSignedIn) => {
const accountName = truncate(sessionState.accountName, 20);

return (
<ul className="hidden md:flex items-center">
<li className="ui-meganav-item relative">
<MeganavControl
ariaControls="account-panel"
ariaLabel="Account"
theme={theme}
additionalCSS="mr-0"
>
<span className="ui-meganav-link h-64 hover:text-cool-black">
{accountName}
</MeganavControl>
</span>
</li>

<li>
Expand Down

0 comments on commit 1612894

Please sign in to comment.