|
|
@@ -3,9 +3,9 @@ import RefractorCore from 'react-refractor/all'; |
|
|
|
import styles from './style.module.css'; |
|
|
|
import {Marker} from 'react-refractor'; |
|
|
|
|
|
|
|
type PrismDerivedElement = HTMLDivElement; |
|
|
|
export type RefractorDerivedElement = HTMLDivElement; |
|
|
|
|
|
|
|
export interface PrismProps extends Omit<React.HTMLProps<PrismDerivedElement>, 'children'> { |
|
|
|
export interface RefractorProps extends Omit<React.HTMLProps<RefractorDerivedElement>, 'children'> { |
|
|
|
code?: string; |
|
|
|
language?: string; |
|
|
|
lineNumbers?: boolean; |
|
|
@@ -16,7 +16,7 @@ export interface PrismProps extends Omit<React.HTMLProps<PrismDerivedElement>, ' |
|
|
|
markers?: Marker[]; |
|
|
|
} |
|
|
|
|
|
|
|
export const Refractor = React.forwardRef<PrismDerivedElement, PrismProps>(({ |
|
|
|
export const Refractor = React.forwardRef<RefractorDerivedElement, RefractorProps>(({ |
|
|
|
code: codeRaw = '', |
|
|
|
language = 'plain', |
|
|
|
lineNumbers = false, |
|
|
|