otterscan/src/components/AddressHighlighter.tsx
2021-10-28 05:33:41 -03:00

23 lines
553 B
TypeScript

import React from "react";
import SelectionHighlighter, { addressSelector } from "./SelectionHighlighter";
type AddressHighlighterProps = React.PropsWithChildren<{
address: string;
}>;
// TODO: replace all occurences with SelectionHighlighter and remove this component
const AddressHighlighter: React.FC<AddressHighlighterProps> = ({
address,
children,
}) => (
<SelectionHighlighter
myType="address"
myContent={address}
selector={addressSelector}
>
{children}
</SelectionHighlighter>
);
export default AddressHighlighter;