Skip to content
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
6 changes: 6 additions & 0 deletions .changeset/four-ravens-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"examples-site": patch
"bigcommerce-design-patterns": patch
---

Added support for showing a Lozenge in the InstallScreen App name via 2 new props: status & statusText
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ const InstallScreenChannel: FunctionComponent = () => {
// Configuration object for the app details
const app = {
name: "Catalyst",
status: "beta",
statusText: "Beta",
termsOfServiceURL: "https://www.bigcommerce.com/legal/terms/",
privacyPolicyURL: "https://www.bigcommerce.com/legal/privacy/",
logoURL: "./assets/images/icons/bigc-inverted-black.svg",
Expand Down Expand Up @@ -217,7 +219,7 @@ const InstallScreenChannel: FunctionComponent = () => {
<p><a href="https://github.com/bigcommerce/big-design-patterns-sandbox/blob/main/packages/examples-site/src/pages/InstallScreenPage/ChannelExample.tsx" target="_blank">View source code of this pattern</a></p>
`,
scopesDenied: [],
};
} satisfies React.ComponentProps<typeof InstallScreen>["app"];

// Copy texts used in the InstallScreen component
const copy = {
Expand Down Expand Up @@ -251,7 +253,7 @@ const InstallScreenChannel: FunctionComponent = () => {
partnerTier: "Elite",
scopesAllowed: ["read_products", "write_orders"],
scopesDenied: ["write_customers"],
};
} satisfies React.ComponentProps<typeof InstallScreen>["copy"];

// State to track form data changes
const [formData, setFormData] = useState<FormDataType>();
Expand Down
18 changes: 17 additions & 1 deletion packages/patterns/src/components/InstallScreen/InstallScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
H2,
Checkbox,
Small,
Lozenge
} from "@bigcommerce/big-design";
import { Page } from "@bigcommerce/big-design-patterns";
import { FeatureTag, FeatureTagProps } from "../featureTag/FeatureTag";
Expand Down Expand Up @@ -86,6 +87,8 @@ export interface InstallationCopy {
export interface AppType {
logoURL: string;
name: string;
status?: React.ComponentProps<typeof Lozenge>["variant"];
statusText?: string;
developer: DeveloperType;
description?: string;
summary: string;
Expand Down Expand Up @@ -329,7 +332,20 @@ export const InstallScreen: FunctionComponent<InstallScreenProps> = ({
</Box>
</GridItem>
<GridItem>
<H1 marginBottom={"xSmall"}>{app.name}</H1>
<H1 marginBottom={"xSmall"}>
<Flex
flexDirection={{ mobile: "row" }}
flexGap={theme.spacing.xSmall}
flexWrap="wrap"
justifyContent="flex-start"
alignItems="center"
>
<span>{app.name}</span>
{app.status && app.statusText && (
<Lozenge label={app.statusText} variant={app.status} />
)}
</Flex>
</H1>
<Link href={app.developer.url} target="_blank">
{app.developer.name}
</Link>{" "}
Expand Down