diff --git a/ui/src/components/header/beta-info/beta-info.module.scss b/ui/src/components/header/beta-info/beta-info.module.scss new file mode 100644 index 000000000..00dcaf0cd --- /dev/null +++ b/ui/src/components/header/beta-info/beta-info.module.scss @@ -0,0 +1,24 @@ +@import 'src/design-system/variables/variables.scss'; +@import 'src/design-system/variables/colors.scss'; +@import 'src/design-system/variables/typography.scss'; + +.wrapper { + display: flex; + align-items: center; + justify-content: center; + gap: 16px; +} + +.badge { + padding: 4px 16px; + border-radius: 4px; + background-color: $color-success-100; + color: $color-success-700; + text-align: center; + @include label(); +} + +.version { + @include paragraph-x-small(); + white-space: nowrap; +} diff --git a/ui/src/components/header/beta-info/beta-info.tsx b/ui/src/components/header/beta-info/beta-info.tsx new file mode 100644 index 000000000..1e4aef75d --- /dev/null +++ b/ui/src/components/header/beta-info/beta-info.tsx @@ -0,0 +1,19 @@ +import { Tooltip } from 'design-system/components/tooltip/tooltip' +import styles from './beta-info.module.scss' + +const COPY = { + LABEL: 'Beta', + INFO: 'All data is considered test data and may be changed or deleted at any time. Use with caution.', + VERSION: `Build ${__COMMIT_HASH__}`, +} + +export const BetaInfo = () => { + return ( +
+ +
{COPY.LABEL}
+
+ {COPY.VERSION} +
+ ) +} diff --git a/ui/src/components/header/header.module.scss b/ui/src/components/header/header.module.scss index f4c9c3a5d..915474f18 100644 --- a/ui/src/components/header/header.module.scss +++ b/ui/src/components/header/header.module.scss @@ -8,7 +8,8 @@ height: 64px; display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-start; + gap: 32px; padding: 0 100px; background-color: $color-generic-white; border-bottom: 1px solid $color-neutral-100; @@ -22,12 +23,18 @@ vertical-align: middle; } -.infoPages { +.rightContent { display: flex; align-items: center; + justify-content: flex-end; + flex: 1; gap: 4px; } +.infoPages { + display: contents; +} + @media only screen and (max-width: $medium-screen-breakpoint) { .header { padding: 0 32px; @@ -37,5 +44,10 @@ @media only screen and (max-width: $small-screen-breakpoint) { .header { padding: 0 16px; + gap: 16px; + } + + .infoPages { + display: none; } } diff --git a/ui/src/components/header/header.tsx b/ui/src/components/header/header.tsx index f3f31d9eb..6d01a9a6f 100644 --- a/ui/src/components/header/header.tsx +++ b/ui/src/components/header/header.tsx @@ -8,6 +8,7 @@ import { STRING, translate } from 'utils/language' import { usePageTitle } from 'utils/usePageTitle' import { useUser } from 'utils/user/userContext' import ami from './ami.png' +import { BetaInfo } from './beta-info/beta-info' import styles from './header.module.scss' import { UserInfoDialog } from './user-info-dialog/user-info-dialog' @@ -31,10 +32,13 @@ export const Header = () => { className={styles.logo} /> -
- {pages.map((page) => ( - - ))} + +
+
+ {pages.map((page) => ( + + ))} +