File tree Expand file tree Collapse file tree
examples-site/src/pages/InstallScreenPage
patterns/src/components/InstallScreen Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " examples-site " : patch
3+ " bigcommerce-design-patterns " : patch
4+ ---
5+
6+ 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 @@ -178,6 +178,8 @@ const InstallScreenChannel: FunctionComponent = () => {
178178 // Configuration object for the app details
179179 const app = {
180180 name : "Catalyst" ,
181+ status : "beta" ,
182+ statusText : "Beta" ,
181183 termsOfServiceURL : "https://www.bigcommerce.com/legal/terms/" ,
182184 privacyPolicyURL : "https://www.bigcommerce.com/legal/privacy/" ,
183185 logoURL : "./assets/images/icons/bigc-inverted-black.svg" ,
@@ -217,7 +219,7 @@ const InstallScreenChannel: FunctionComponent = () => {
217219 <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>
218220 ` ,
219221 scopesDenied : [ ] ,
220- } ;
222+ } satisfies React . ComponentProps < typeof InstallScreen > [ "app" ] ;
221223
222224 // Copy texts used in the InstallScreen component
223225 const copy = {
@@ -251,7 +253,7 @@ const InstallScreenChannel: FunctionComponent = () => {
251253 partnerTier : "Elite" ,
252254 scopesAllowed : [ "read_products" , "write_orders" ] ,
253255 scopesDenied : [ "write_customers" ] ,
254- } ;
256+ } satisfies React . ComponentProps < typeof InstallScreen > [ "copy" ] ;
255257
256258 // State to track form data changes
257259 const [ formData , setFormData ] = useState < FormDataType > ( ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
2323 H2 ,
2424 Checkbox ,
2525 Small ,
26+ Lozenge
2627} from "@bigcommerce/big-design" ;
2728import { Page } from "@bigcommerce/big-design-patterns" ;
2829import { FeatureTag , FeatureTagProps } from "../featureTag/FeatureTag" ;
@@ -86,6 +87,8 @@ export interface InstallationCopy {
8687export interface AppType {
8788 logoURL : string ;
8889 name : string ;
90+ status ?: React . ComponentProps < typeof Lozenge > [ "variant" ] ;
91+ statusText ?: string ;
8992 developer : DeveloperType ;
9093 description ?: string ;
9194 summary : string ;
@@ -329,7 +332,20 @@ export const InstallScreen: FunctionComponent<InstallScreenProps> = ({
329332 </ Box >
330333 </ GridItem >
331334 < GridItem >
332- < H1 marginBottom = { "xSmall" } > { app . name } </ H1 >
335+ < H1 marginBottom = { "xSmall" } >
336+ < Flex
337+ flexDirection = { { mobile : "row" } }
338+ flexGap = { theme . spacing . xSmall }
339+ flexWrap = "wrap"
340+ justifyContent = "flex-start"
341+ alignItems = "center"
342+ >
343+ < span > { app . name } </ span >
344+ { app . status && app . statusText && (
345+ < Lozenge label = { app . statusText } variant = { app . status } />
346+ ) }
347+ </ Flex >
348+ </ H1 >
333349 < Link href = { app . developer . url } target = "_blank" >
334350 { app . developer . name }
335351 </ Link > { " " }
You can’t perform that action at this time.
0 commit comments