style: search models style
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import CodeViewer from './code-viewer';
|
||||
import './style.less';
|
||||
import CodeViewerLight from './code-viewer-light';
|
||||
import './styles/index.less';
|
||||
|
||||
const HighlightCode: React.FC<{
|
||||
code: string;
|
||||
lang?: string;
|
||||
copyable?: boolean;
|
||||
theme?: 'light' | 'dark';
|
||||
}> = (props) => {
|
||||
const { code, lang = 'bash', copyable = true } = props;
|
||||
const { code, lang = 'bash', copyable = true, theme = 'dark' } = props;
|
||||
|
||||
return (
|
||||
<div className="high-light-wrapper">
|
||||
<CodeViewer lang={lang} code={code} copyable={copyable} />
|
||||
{theme === 'dark' ? (
|
||||
<CodeViewer lang={lang} code={code} copyable={copyable} />
|
||||
) : (
|
||||
<CodeViewerLight lang={lang} code={code} copyable={copyable} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user