|
|
@@ -10,6 +10,7 @@ export interface PrismProps extends Omit<React.HTMLProps<PrismDerivedElement>, ' |
|
|
|
lineNumbers?: boolean; |
|
|
|
tabSize?: number; |
|
|
|
header?: boolean; |
|
|
|
scroll?: boolean; |
|
|
|
} |
|
|
|
|
|
|
|
export const Refractor = React.forwardRef<PrismDerivedElement, PrismProps>(({ |
|
|
@@ -20,6 +21,7 @@ export const Refractor = React.forwardRef<PrismDerivedElement, PrismProps>(({ |
|
|
|
className, |
|
|
|
style, |
|
|
|
header = false, |
|
|
|
scroll = false, |
|
|
|
...etcProps |
|
|
|
}, forwardedRef) => { |
|
|
|
return ( |
|
|
@@ -41,7 +43,7 @@ export const Refractor = React.forwardRef<PrismDerivedElement, PrismProps>(({ |
|
|
|
type="submit" |
|
|
|
name="action" |
|
|
|
value="copyContents" |
|
|
|
className="h-12 uppercase text-primary font-bold" |
|
|
|
className="h-12 uppercase text-primary font-semi-expanded font-bold" |
|
|
|
> |
|
|
|
Copy |
|
|
|
</button> |
|
|
@@ -67,7 +69,9 @@ export const Refractor = React.forwardRef<PrismDerivedElement, PrismProps>(({ |
|
|
|
</code> |
|
|
|
</pre> |
|
|
|
)} |
|
|
|
<div className="flex-auto overflow-auto"> |
|
|
|
<div |
|
|
|
className={clsx('flex-auto', scroll && 'overflow-auto')} |
|
|
|
> |
|
|
|
<RefractorCore |
|
|
|
{...etcProps} |
|
|
|
language={language} |
|
|
|