Skip to content

Commit

Permalink
feat: responsive header, navigation and headings and avatars (#2959)
Browse files Browse the repository at this point in the history
* feat: add margins around navigation icons

* feat: responsive headings in hader

* chore: change class placements

---------

Co-authored-by: René Aaron <rene@twentyuno.net>
  • Loading branch information
pavanjoshi914 and reneaaron authored Jan 31, 2024
1 parent e9bb036 commit f027a1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/app/components/AccountDetailLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ function AccountDetailLayout() {
{account.name}
</h2>
<span>/</span>
<span>{t("title1")}</span>
<span className="text-ellipsis whitespace-nowrap overflow-hidden">
{t("title1")}
</span>
</div>
)}
</Header>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Avatar = (props: Props) => {
const AvatarImage = (props: Props) => {
return (
<div
className={classNames("translate-z-0", props.className ?? "")}
className={classNames("translate-z-0 shrink-0", props.className ?? "")}
style={{
width: `${props.size}px`,
height: `${props.size}px`,
Expand Down Expand Up @@ -52,7 +52,7 @@ const AvatarSVG = (props: Omit<Props, "url">) => {
return (
<svg
className={classNames(
"rounded-full overflow-hidden translate-z-0",
"rounded-full overflow-hidden translate-z-0 shrink-0",
props.className ?? ""
)}
ref={svgRef}
Expand Down
8 changes: 5 additions & 3 deletions src/app/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ function Header({ children, headerLeft, headerRight }: Props) {
return (
<div className="bg-white py-[6px] border-b border-gray-200 dark:bg-surface-01dp dark:border-neutral-700">
<div className="flex justify-between items-center container max-w-screen-lg px-4 mx-auto">
<div className="w-8 h-8">{headerLeft}</div>
<h1 className="text-lg font-medium dark:text-white">{children}</h1>
<div className="w-8 h-8">{headerRight}</div>
<div className="w-8 h-8 mr-3">{headerLeft}</div>
<h1 className="text-lg font-medium dark:text-white overflow-hidden">
{children}
</h1>
<div className="w-8 h-8 ml-3">{headerRight}</div>
</div>
</div>
);
Expand Down

0 comments on commit f027a1d

Please sign in to comment.