Skip to content

Commit b83dcc4

Browse files
committed
chore: use semantically correct tags for docs
1 parent 414ca29 commit b83dcc4

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

docs/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ items.forEach(it => {
3636
import React from 'react';
3737
import Page from '../templates/Page';
3838
import ComponentDocs from '../templates/ComponentDocs';
39-
4039
export default function ${it.name}Doc(props) {
4140
return (
4241
<Page {...props} pages={${JSON.stringify(index)}}>

docs/templates/ComponentDocs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const propLabel = css({
3636
export default function ComponentDocs(props: any) {
3737
return (
3838
<div {...wrapper}>
39-
<div {...mono} {...name}>{`<${props.name} />`}</div>
40-
<div {...body}>{props.info.description}</div>
41-
<div {...mono} {...propsHeader}>Props</div>
39+
<h1 {...mono} {...name}>{`<${props.name} />`}</h1>
40+
<p {...body}>{props.info.description}</p>
41+
<h2 {...mono} {...propsHeader}>Props</h2>
4242
{Object.keys(props.info.props).map(prop => (
4343
<div {...propInfo} key={prop}>
44-
<div {...mono} {...propLabel}>{prop}: {props.info.props[prop].flowType.name}</div>
44+
<code {...mono} {...propLabel}>{prop}: {props.info.props[prop].flowType.name}</code>
4545
<div {...body}>{props.info.props[prop].description}</div>
4646
</div>
4747
))}

docs/templates/Home.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export default function Home() {
3131
return (
3232
<div {...wrapper}>
3333
<div {...inner}>
34-
<div {...mono} {...heading}>React Native Paper</div>
35-
<div {...body} {...description}>Documentation</div>
34+
<h1 {...mono} {...heading}>React Native Paper</h1>
35+
<p {...body} {...description}>Documentation</p>
3636
</div>
3737
</div>
3838
);

docs/templates/Page.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const active = css({
4949
export default function Body({ url, pages, children }: any) {
5050
return (
5151
<div {...wrapper}>
52-
<div {...sidebar}>
52+
<nav {...sidebar}>
5353
<Link href='/'>
5454
<a {...mono} {...link} {...(url.pathname === '/' ? active : null)}>
5555
Home
@@ -63,7 +63,7 @@ export default function Body({ url, pages, children }: any) {
6363
</a>
6464
</Link>
6565
)}
66-
</div>
66+
</nav>
6767
<div {...content}>
6868
{children}
6969
</div>

0 commit comments

Comments
 (0)