generated from abelflopes/lerna-monorepo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fbce8f
commit 807c09f
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import styles from "./styles/index.module.scss"; | ||
import classNames from "classnames"; | ||
|
||
export interface TopBarProps extends React.HTMLAttributes<HTMLElement> { | ||
before?: React.ReactNode; | ||
after?: React.ReactNode; | ||
} | ||
|
||
export const TopBar = ({ | ||
before, | ||
after, | ||
className, | ||
children, | ||
...otherProps | ||
}: Readonly<TopBarProps>): React.ReactElement => ( | ||
<nav className={classNames(styles.root, className)} {...otherProps}> | ||
{before ? <div className={styles.section}>{before}</div> : null} | ||
<div className={styles.section}>{children}</div> | ||
{after ? <div className={styles.section}>{after}</div> : null} | ||
</nav> | ||
); |
29 changes: 29 additions & 0 deletions
29
packages/components/_provisional/src/top-bar/styles/index.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@import "@react-ck/theme"; | ||
@import "@react-ck/text"; | ||
|
||
.root { | ||
@include text-base; | ||
@include text-type(h3); | ||
|
||
display: flex; | ||
align-items: center; | ||
gap: get-spacing(4); | ||
background-color: get-color(neutral-light-2); | ||
padding: get-spacing(1); | ||
|
||
.section { | ||
flex-basis: 33%; | ||
display: flex; | ||
align-items: center; | ||
gap: get-spacing(2); | ||
justify-content: center; | ||
|
||
&:first-child { | ||
justify-content: flex-start; | ||
} | ||
|
||
&:last-child { | ||
justify-content: flex-end; | ||
} | ||
} | ||
} |