mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 10:37:20 +02:00
refactor(theme-classic): split CodeBlock (#7175)
* extract CodeBlockLine * stable refactor * stable refactor * stable refactor * add CodeBlockContainer * refactor * refactor * do the actual split Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
0f5f6f31e0
commit
5273a534d3
10 changed files with 341 additions and 201 deletions
|
@ -182,11 +182,10 @@ export function getPrismCssVariables(prismTheme: PrismTheme): CSSProperties {
|
|||
backgroundColor: '--prism-background-color',
|
||||
};
|
||||
|
||||
const properties: CSSProperties = {};
|
||||
const properties: {[key: string]: string} = {};
|
||||
Object.entries(prismTheme.plain).forEach(([key, value]) => {
|
||||
const varName = mapping[key];
|
||||
if (varName && typeof value === 'string') {
|
||||
// @ts-expect-error: why css variables not in inline style type?
|
||||
properties[varName] = value;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue