-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a49ebc0
commit f23a34d
Showing
46 changed files
with
506 additions
and
2,956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
packages/dumi-theme-lobehub/src/builtins/SourceCode/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import { FC } from 'react'; | ||
|
||
import { Highlighter } from '@lobehub/ui'; | ||
import { useTheme } from 'antd-style'; | ||
import { rgba } from 'polished'; | ||
import { FC } from 'react'; | ||
|
||
interface SourceCodeProps { | ||
lang: string; | ||
children: string; | ||
} | ||
|
||
const SourceCode: FC<SourceCodeProps> = ({ children, lang }) => { | ||
return <Highlighter language={lang}>{children}</Highlighter>; | ||
const theme = useTheme(); | ||
return ( | ||
<Highlighter style={{ background: rgba(theme.colorBgLayout, 0.5) }} language={lang}> | ||
{children} | ||
</Highlighter> | ||
); | ||
}; | ||
|
||
export default SourceCode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
packages/dumi-theme-lobehub/src/components/CodeSnippet/index.tsx
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/dumi-theme-lobehub/src/components/CodeSnippet/style.ts
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
packages/dumi-theme-lobehub/src/components/Highlighter/Highlighter.style.ts
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
packages/dumi-theme-lobehub/src/components/Highlighter/Highlighter.tsx
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
packages/dumi-theme-lobehub/src/components/Highlighter/Prism.tsx
This file was deleted.
Oops, something went wrong.
108 changes: 0 additions & 108 deletions
108
packages/dumi-theme-lobehub/src/components/Highlighter/index.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.