Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import { Eth } from "@rimble/icons"; import { DidKeyIcon, DidSovIcon, DidWebIcon } from "./Icons"; export interface DidMethodIconProps { did: string; size: string; } export const DidMethodIcon: React.FunctionComponent<DidMethodIconProps> = (props) => { const { did, size } = props; return ( <> {did.includes("did:ethr:rinkeby") ? ( <Eth color="#F6C343" size={size} /> ) : did.includes("did:ethr") ? ( <Eth color="#637EEA" size={size} /> ) : did.includes("did:key") ? ( <DidKeyIcon size={size} /> ) : did.includes("did:sov") ? ( <DidSovIcon size={size} /> ) : did.includes("did:web") ? ( <DidWebIcon size={size} /> ) : ( <></> )} </> ); }; |