Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lifecycle badge component #4528

Merged
merged 9 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions website/docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pagination_next: null
pagination_prev: null
---


<Snippet path="what-is-dbt-intro" />

dbt compiles and runs your analytics code against your data platform, enabling you and your team to collaborate on a single source of truth for metrics, insights, and business definitions. This single source of truth, combined with the ability to define tests for your data, reduces errors when logic changes, and alerts you when issues arise.
Expand Down
11 changes: 11 additions & 0 deletions website/src/components/lifeCycle/index.js
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>
);
}
13 changes: 13 additions & 0 deletions website/src/components/lifeCycle/styles.module.css
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 */
}
2 changes: 2 additions & 0 deletions website/src/theme/MDXComponents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import CommunitySpotlightCard from '@site/src/components/communitySpotlightCard'
import CommunitySpotlightList from '@site/src/components/communitySpotlightList';
import dbtEditor from '@site/src/components/dbt-editor';
import Icon from '@site/src/components/icon';
import Lifecycle from '@site/src/components/lifeCycle';

const MDXComponents = {
head: MDXHead,
Expand Down Expand Up @@ -90,5 +91,6 @@ const MDXComponents = {
CommunitySpotlightList,
dbtEditor: dbtEditor,
Icon: Icon,
Lifecycle: Lifecycle,
};
export default MDXComponents;
Loading