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