-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add lifecycle badge component (#4528)
creating a lifecycle badge to enable the docs team and documentarians to use a component allowing them to add a lifecycle badge on specific content.
- Loading branch information
Showing
4 changed files
with
27 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
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,11 @@ | ||
import React from 'react' | ||
import styles from './styles.module.css'; | ||
|
||
export default function Lifecycle(props) { | ||
if (!props.status) { | ||
return null; | ||
} | ||
return ( | ||
<span className={styles.lifecycle}>{props.status}</span> | ||
); | ||
} |
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,13 @@ | ||
.lifecycle { | ||
background-color: #047377; /* Teal background to align with dbt Labs' color */ | ||
color: #fff; /* Light text color for contrast */ | ||
font-size: 0.78rem; /* 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 */ | ||
vertical-align: middle; /* Align with the title */ | ||
display: inline-block; /* Use inline-block for better control */ | ||
font-weight: bold; /* Bold text */ | ||
text-transform: capitalize; /* Uppercase text */ | ||
line-height: 1.6; /* Adjust line height for vertical alignment */ | ||
} |
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