{code}
- {code}
- {code}
- {code}
- {code}
- {code.join('--------------\n')}
- -- ); -}; - -export default Codebox; diff --git a/components/Article/Codebox/themes/_dark.scss b/components/Article/Codebox/themes/_dark.scss deleted file mode 100644 index 6f1fdbd7d522f..0000000000000 --- a/components/Article/Codebox/themes/_dark.scss +++ /dev/null @@ -1,90 +0,0 @@ -@mixin theme { - background: var(--black9); - color: var(--black2); - - :global .token { - &.comment, - &.prolog, - &.doctype, - &.cdata { - color: #8292a2; - } - - &.operator, - &.punctuation { - color: var(--black2); - } - - &.namespace { - opacity: 0.7; - } - - &.property, - &.tag, - &.constant, - &.symbol, - &.deleted { - color: #f92672; - } - - &.boolean { - color: #ae81ff; - } - - &.selector, - &.attr-name, - &.char, - &.builtin, - &.inserted { - color: #a6e22e; - } - - &.entity, - &.url, - .language-css &.string, - .style &.string, - &.variable { - color: #f8f8f2; - } - - &.atrule, - &.attr-value, - &.class-name { - color: #e6db74; - } - - &.function { - color: var(--warning3); - } - - &.string { - color: var(--brand3); - } - - &.keyword { - color: var(--info3); - } - - &.number { - color: var(--purple3); - } - - &.regex, - &.important { - color: #fd971f; - } - - &.important, - &.bold { - font-weight: var(--font-weight-bold); - } - - &.italic { - font-style: italic; - } - - &.entity { - cursor: help; - } - } -} diff --git a/components/Article/Codebox/themes/_light.scss b/components/Article/Codebox/themes/_light.scss deleted file mode 100644 index 403e30dffabd6..0000000000000 --- a/components/Article/Codebox/themes/_light.scss +++ /dev/null @@ -1,76 +0,0 @@ -@mixin theme { - background: var(--black3); - color: black; - - :global .token { - &.comment, - &.prolog, - &.doctype, - &.cdata { - color: slategray; - } - - &.namespace { - opacity: 0.7; - } - - &.property, - &.tag, - &.boolean, - &.number, - &.constant, - &.symbol, - &.deleted { - color: #905; - } - - &.selector, - &.attr-name, - &.char, - &.builtin, - &.inserted { - color: #690; - } - - &.entity, - &.url { - background: hsla(0, 0%, 100%, 0.5); - color: #9a6e3a; - } - - &.atrule, - &.attr-value, - &.keyword { - color: #07a; - } - - &.function, - &.class-name { - color: #dd4a68; - } - - &.regex, - &.important, - &.variable { - color: #e90; - } - - &.important, - &.bold { - font-weight: var(--font-weight-vold); - } - &.italic { - font-style: italic; - } - - &.entity { - cursor: help; - } - - &.punctuation, - &.operator, - &.string { - background-color: var(--black3); - } - } -} diff --git a/hooks/usePrismJS.ts b/hooks/usePrismJS.ts deleted file mode 100644 index 2bdd4fa786f20..0000000000000 --- a/hooks/usePrismJS.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { highlightElement } from 'prismjs'; -import { createRef, useMemo } from 'react'; -import { loadLanguage } from '@/next.prism.mjs'; - -export const usePrismJS = (language: string) => { - const codeRef = createRef-- - {hideHeader && copyButton} - -- {languageOptions.map((lang, index) => { - const langClasses = classnames(styles.lang, { - [styles.selected]: index === langIndex, - }); - - return ( - - ); - })} -- - {copyButton} -- {codeArray[langIndex]} --