Skip to content

Commit

Permalink
🏷️ build: 导出 HighlighterSyntaxTheme 类型
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 15, 2023
1 parent 69e1e36 commit f92f8fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Highlighter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import { LanguageKeys } from './language';
import { useStyles } from './style';
export { Prism } from './Prism';

export interface HighlighterSyntaxTheme {
shiki?: Partial<ShikiSyntaxTheme>;
prism?: Partial<PrismSyntaxTheme>;
}

export interface HighlighterProps {
children: string;
language: LanguageKeys | string;
Expand All @@ -31,10 +36,7 @@ export interface HighlighterProps {
*/
trim?: string;
style?: CSSProperties;
syntaxThemes?: {
shiki?: Partial<ShikiSyntaxTheme>;
prism?: Partial<PrismSyntaxTheme>;
};
syntaxThemes?: HighlighterSyntaxTheme;
/**
* 是否可拷贝
*/
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { CSSProperties } from 'react';

export type { HighlighterSyntaxTheme } from './components/Highlighter';

export type ImageContainerType = 'light' | 'primary' | 'soon';

export interface IFeature {
Expand Down

1 comment on commit f92f8fb

@vercel
Copy link

@vercel vercel bot commented on f92f8fb Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.