Better example intros (#2912)

Moves the article content above the iframe and adds the description to
the title.


- [x] `documentation` — Changes to the documentation only[^2]


### Release Notes

- Adds more info to the examples section of the docs.
pull/2917/head
Taha 2024-02-22 09:05:35 +00:00 zatwierdzone przez GitHub
rodzic ee5b70dfc7
commit f3f8475fc5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -28,9 +28,10 @@ export async function ExampleDocsPage({ article }: { article: Article }) {
<div className="page-header">
<Breadcrumb section={section} category={category} />
<h1>{article.title}</h1>
{article.description && <p>{article.description}</p>}
</div>
{article.hero && <Image alt="hero" title={article.title} src={`images/${article.hero}`} />}
{article.description && <Mdx content={article.description} />}
{article.content && <Mdx content={article.content} />}
{article.componentCode && (
<ExampleCodeBlock
articleId={article.id}
@ -41,7 +42,6 @@ export async function ExampleDocsPage({ article }: { article: Article }) {
activeFile={'App.tsx'}
/>
)}
{article.content && <Mdx content={article.content} />}
{links && <ArticleNavLinks links={links} />}
</main>
</>

Wyświetl plik

@ -549,6 +549,11 @@ body {
margin: 0;
}
.page-header > p {
margin-top: 1rem;
}
.article table {
margin: 20px 0px;
border-radius: var(--border-radius-menu);