Skip to content

Commit ee56391

Browse files
authored
docs(ProjectTemplate): adjust labels & styles (SAP#6566)
1 parent 14ee2b5 commit ee56391

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

.storybook/components/ProjectTemplate.module.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.cardContainer {
22
position: relative;
33
width: 500px;
4-
height: 20rem;
54
margin-block-end: 2rem;
65
flex-shrink: 0;
76
}
@@ -38,3 +37,7 @@
3837
.popover::part(content) {
3938
padding: 0.5rem;
4039
}
40+
41+
.verticalLine {
42+
padding-inline: 0.1rem;
43+
}

.storybook/components/ProjectTemplate.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
ThemeProvider
1414
} from '@ui5/webcomponents-react';
1515
import { clsx } from 'clsx';
16-
import { ReactNode, useRef, useState } from 'react';
16+
import type { ReactNode } from 'react';
17+
import { useRef, useState } from 'react';
1718
import { addCustomCSSWithScoping } from '../../packages/main/src/internal/addCustomCSSWithScoping';
1819
import classes from './ProjectTemplate.module.css';
1920

@@ -84,9 +85,9 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
8485
}}
8586
>
8687
<Text>
87-
Currently, the <code>BarcodeScannerDialog</code> web component isn't compatible with SSR environments.
88-
For the Next.js Pages Router and Remix, this bug crashes the entire build process, even if the component
89-
isn't imported.
88+
Currently, the <code>BarcodeScannerDialog</code> web component isn&apos;t compatible with SSR
89+
environments. For the Next.js Pages Router and Remix, this bug crashes the entire build process, even if
90+
the component isn&apos;t imported.
9091
<br />
9192
This is <b>not</b> the case for the Next.js App Router; there, the build only crashes if the component
9293
is used.
@@ -129,19 +130,16 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
129130
>
130131
<div className={classes.cardContent}>
131132
{deprecationNotice && (
132-
<MessageStrip
133-
hideCloseButton
134-
design={MessageStripDesign.Critical}
135-
children={deprecationNotice}
136-
className={classes.deprecationNotice}
137-
/>
133+
<MessageStrip hideCloseButton design={MessageStripDesign.Critical} className={classes.deprecationNotice}>
134+
{deprecationNotice}
135+
</MessageStrip>
138136
)}
139137
<Link design={LinkDesign.Emphasized} href={href}>
140-
View Example
138+
View{isTemplate ? ' Template' : ' Example'}
141139
</Link>
142140
{stackBlitzHref && (
143141
<>
144-
|
142+
<span className={classes.verticalLine}>|</span>
145143
<Link design={LinkDesign.Emphasized} href={stackBlitzHref}>
146144
View in StackBlitz
147145
</Link>

docs/ProjectTemplates.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A curated list of minimal project templates and examples to get started using UI
1717

1818
<br />
1919

20-
<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%' }} justifyContent={FlexBoxJustifyContent.SpaceBetween}>
20+
<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%', gap: '1rem' }} justifyContent={FlexBoxJustifyContent.Start}>
2121
<ProjectTemplate
2222
title={'Next.js'}
2323
subtitle={'App Router'}
@@ -52,7 +52,7 @@ A curated list of minimal project templates and examples to get started using UI
5252

5353
<br />
5454

55-
<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%' }} justifyContent={FlexBoxJustifyContent.SpaceBetween}>
55+
<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%', gap: '1rem' }} justifyContent={FlexBoxJustifyContent.Start}>
5656
<ProjectTemplate
5757
title={'Next.js'}
5858
subtitle={'App Router'}

0 commit comments

Comments
 (0)