Skip to content

docs(ProjectTemplate): adjust labels & styles #6566

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

Merged
merged 1 commit into from
Oct 30, 2024
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
5 changes: 4 additions & 1 deletion .storybook/components/ProjectTemplate.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.cardContainer {
position: relative;
width: 500px;
height: 20rem;
margin-block-end: 2rem;
flex-shrink: 0;
}
Expand Down Expand Up @@ -38,3 +37,7 @@
.popover::part(content) {
padding: 0.5rem;
}

.verticalLine {
padding-inline: 0.1rem;
}
22 changes: 10 additions & 12 deletions .storybook/components/ProjectTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
ThemeProvider
} from '@ui5/webcomponents-react';
import { clsx } from 'clsx';
import { ReactNode, useRef, useState } from 'react';
import type { ReactNode } from 'react';
import { useRef, useState } from 'react';
import { addCustomCSSWithScoping } from '../../packages/main/src/internal/addCustomCSSWithScoping';
import classes from './ProjectTemplate.module.css';

Expand Down Expand Up @@ -84,9 +85,9 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
}}
>
<Text>
Currently, the <code>BarcodeScannerDialog</code> web component isn't compatible with SSR environments.
For the Next.js Pages Router and Remix, this bug crashes the entire build process, even if the component
isn't imported.
Currently, the <code>BarcodeScannerDialog</code> web component isn&apos;t compatible with SSR
environments. For the Next.js Pages Router and Remix, this bug crashes the entire build process, even if
the component isn&apos;t imported.
<br />
This is <b>not</b> the case for the Next.js App Router; there, the build only crashes if the component
is used.
Expand Down Expand Up @@ -129,19 +130,16 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
>
<div className={classes.cardContent}>
{deprecationNotice && (
<MessageStrip
hideCloseButton
design={MessageStripDesign.Critical}
children={deprecationNotice}
className={classes.deprecationNotice}
/>
<MessageStrip hideCloseButton design={MessageStripDesign.Critical} className={classes.deprecationNotice}>
{deprecationNotice}
</MessageStrip>
)}
<Link design={LinkDesign.Emphasized} href={href}>
View Example
View{isTemplate ? ' Template' : ' Example'}
</Link>
{stackBlitzHref && (
<>
|
<span className={classes.verticalLine}>|</span>
<Link design={LinkDesign.Emphasized} href={stackBlitzHref}>
View in StackBlitz
</Link>
Expand Down
4 changes: 2 additions & 2 deletions docs/ProjectTemplates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A curated list of minimal project templates and examples to get started using UI

<br />

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

<br />

<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%' }} justifyContent={FlexBoxJustifyContent.SpaceBetween}>
<FlexBox wrap={FlexBoxWrap.Wrap} style={{ width: '100%', gap: '1rem' }} justifyContent={FlexBoxJustifyContent.Start}>
<ProjectTemplate
title={'Next.js'}
subtitle={'App Router'}
Expand Down
Loading