Skip to content

Commit

Permalink
website: fix example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 1, 2023
1 parent dda529b commit 73cced5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions www/src/pages/theme/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Counter = () => {
);
};`;

const CodeEditor = styled(CodeMirror)`
const CodeEditor = styled.div`
border-radius: 0.375rem;
overflow: hidden;
position: relative;
Expand All @@ -75,16 +75,19 @@ export function Component() {
.join('-')
.replace(/-light$/, '/light')
.replace(/-dark$/, '/dark');
const themeExtension = themeData[name as keyof typeof themeData];
return (
<Link key={idx} to={`/theme/data/${linkName}`}>
<ThemeCard>
<Title>{toTitleCase(name)}</Title>
<CodeEditor
value={codeString}
height="185px !important"
theme={themeData[name as keyof typeof themeData]}
extensions={[color, langs.jsx()]}
/>
<CodeEditor>
<CodeMirror
theme={themeExtension}
value={codeString}
height="185px !important"
extensions={[color, langs.jsx()]}
/>
</CodeEditor>
</ThemeCard>
</Link>
);
Expand Down

0 comments on commit 73cced5

Please sign in to comment.