Skip to content

Commit

Permalink
adjust colors and font size
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Jan 25, 2024
1 parent b352cf4 commit 812c64f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions website/src/components/lifeCycle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ import React from 'react'
import styles from './styles.module.css';

const statusColors = {
enterprise: '#727d91',
team: '#727d91',
developer: '#727d91',
enterprise: '#f3f4f6',
team: '#f3f4f6',
developer: '#f3f4f6',
new: '#047377',
beta: '#047377',
ga: '#047377',
'public preview': '#047377',
};

const fontColors = {
enterprise: '#000000',
team: '#000000',
developer: '#000000',
// lifecycle statuses use the css determined font color (white)
};

export default function Lifecycle(props) {
// Check if props.status is an array or a single value
const statuses = Array.isArray(props.status) ? props.status : [props.status];
Expand All @@ -19,7 +26,8 @@ export default function Lifecycle(props) {
<>
{statuses.map((status, index) => {
const style = {
backgroundColor: props.backgroundColor || statusColors[status] || '#047377' // Default to teal if no match
backgroundColor: props.backgroundColor || statusColors[status] || '#047377', // default to teal if no match
color: fontColors[status] || '#fff' // default font color if no matc
};

return (
Expand Down
3 changes: 2 additions & 1 deletion website/src/components/lifeCycle/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.lifecycle {
background-color: #047377; /* Default teal background */
color: #fff; /* Light text color for contrast */
font-size: 0.78rem; /* Using rem so font size is relative to root */
font-size: 0.8rem; /* Using rem so font size is relative to root */
padding: 1px 8px; /* Adjust padding for a more pill-like shape */
border-radius: 16px; /* Larger border-radius for rounded edges */
margin-left: 8px; /* Margin to separate from the header text */
Expand All @@ -12,3 +12,4 @@
line-height: 1.6; /* Adjust line height for vertical alignment */
}


0 comments on commit 812c64f

Please sign in to comment.