Skip to content

Commit

Permalink
doc: update example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 13, 2023
1 parent 4de98b8 commit f4a6bf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ const value = [
const Demo = () => {
return (
<div>
<HeatMap value={value} startDate={new Date('2016/01/01')} />
<HeatMap
value={value}
weekLabels={['', 'Mon', '', 'Wed', '', 'Fri', '']}
startDate={new Date('2016/01/01')}
/>
</div>
)
};
Expand Down
6 changes: 3 additions & 3 deletions www/src/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ const CodePreview: CodeComponent | ReactMarkdownNames = ({ inline, node, ...prop
const Child = data.components[`${metaId}`];
if (metaId && typeof Child === 'function') {
const code = data.data[metaId].value || '';
const param = getURLParameters(meta);
const { title } = getURLParameters(meta);
return (
<CodeLayout>
<Preview>
<Preview style={{ background: 'var(--color-theme-bg)' }}>
<Child />
</Preview>
<Toolbar text={code}>{param.title || 'Code Example'}</Toolbar>
<Toolbar text={code}>{title || 'Code Example'}</Toolbar>
<Code>
<code {...rest}/>
</Code>
Expand Down

0 comments on commit f4a6bf5

Please sign in to comment.