Skip to content

Commit

Permalink
Setup beta info component
Browse files Browse the repository at this point in the history
  • Loading branch information
annavik committed Jan 31, 2024
1 parent 550dd63 commit bff5178
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ui/src/components/header/beta-info/beta-info.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@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;
@include label();
}

.version {
@include paragraph-x-small();
white-space: nowrap;
}
19 changes: 19 additions & 0 deletions ui/src/components/header/beta-info/beta-info.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Tooltip } from 'design-system/components/tooltip/tooltip'
import styles from './beta-info.module.scss'

const COPY = {
LABEL: 'Beta',
INFO: 'More info about beta status goes here?',
VERSION: import.meta.env.PACKAGE_VERSION, // Read version from package.json
}

export const BetaInfo = () => {
return (
<div className={styles.wrapper}>
<Tooltip content={COPY.INFO}>
<div className={styles.badge}>{COPY.LABEL}</div>
</Tooltip>
<span className={styles.version}>Version {COPY.VERSION}</span>
</div>
)
}

0 comments on commit bff5178

Please sign in to comment.