otterscan/src/components/AddressHighlighter.tsx

23 lines
553 B
TypeScript
Raw Normal View History

import React from "react";
import SelectionHighlighter, { addressSelector } from "./SelectionHighlighter";
2021-07-14 19:17:27 +00:00
type AddressHighlighterProps = React.PropsWithChildren<{
address: string;
2021-07-14 19:17:27 +00:00
}>;
2021-10-28 05:56:17 +00:00
// 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>
);
2021-10-27 18:49:15 +00:00
export default AddressHighlighter;