Skip to content

Commit

Permalink
style: set ProfilePage header text to center
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooorobo committed Dec 23, 2024
1 parent 01bac5b commit df6e8ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/shared/ui/layout/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
align-items: center;
background-color: var(--color-neutral-0);
z-index: 2;
position: relative;
}

.CloseButton {
Expand All @@ -14,6 +15,18 @@
.Suffix {
margin-left: auto;
}

.Content {
position: absolute;
top: 0;
height: 100%;
left: 50%;
transform: translateX(-50%);

display: flex;
align-items: center;
}

.Prefix {
margin-right: auto;
}
2 changes: 1 addition & 1 deletion src/shared/ui/layout/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Header = ({
</Button>
)}
{prefixSlot && <span className={styles.Prefix}>{prefixSlot}</span>}
{children}
<span className={styles.Content}>{children}</span>
{suffixSlot && <span className={styles.Suffix}>{suffixSlot}</span>}
{onClose && (
<Button
Expand Down

0 comments on commit df6e8ea

Please sign in to comment.