Apply selection highlighter to function sigs
This commit is contained in:
parent
f800f05787
commit
05953de053
@ -18,6 +18,8 @@ export const genericSelector =
|
||||
selection.content === content;
|
||||
|
||||
export const addressSelector: ContentSelector = genericSelector("address");
|
||||
export const functionSigSelector: ContentSelector =
|
||||
genericSelector("functionSig");
|
||||
|
||||
type SelectionHighlighterProps = React.PropsWithChildren<{
|
||||
myType: SelectionType;
|
||||
|
@ -1,4 +1,7 @@
|
||||
import React from "react";
|
||||
import SelectionHighlighter, {
|
||||
functionSigSelector,
|
||||
} from "../components/SelectionHighlighter";
|
||||
|
||||
type FunctionSignatureProps = {
|
||||
callType: string;
|
||||
@ -9,6 +12,11 @@ const FunctionSignature: React.FC<FunctionSignatureProps> = ({
|
||||
callType,
|
||||
sig,
|
||||
}) => (
|
||||
<SelectionHighlighter
|
||||
myType="functionSig"
|
||||
myContent={sig}
|
||||
selector={functionSigSelector}
|
||||
>
|
||||
<span
|
||||
className={`font-bold ${
|
||||
callType === "STATICCALL"
|
||||
@ -20,6 +28,7 @@ const FunctionSignature: React.FC<FunctionSignatureProps> = ({
|
||||
>
|
||||
{sig}
|
||||
</span>
|
||||
</SelectionHighlighter>
|
||||
);
|
||||
|
||||
export default FunctionSignature;
|
||||
|
Loading…
Reference in New Issue
Block a user