|
| 1 | +import React from "react"; |
| 2 | +import styled from "styled-components"; |
| 3 | +import { withTokens } from "../../libs"; |
| 4 | +import { Text } from "../../../components"; |
| 5 | + |
| 6 | +type NetworkItemProps = { |
| 7 | + name: string; |
| 8 | + onClick: () => void; |
| 9 | +}; |
| 10 | + |
| 11 | +const TempAssetBadge = () => ( |
| 12 | + // TODO: To be replaced with LIVE-18221 |
| 13 | + <div style={{ display: "flex", alignItems: "center" }}> |
| 14 | + <span |
| 15 | + style={{ |
| 16 | + height: 48, |
| 17 | + width: 48, |
| 18 | + borderRadius: 48, |
| 19 | + backgroundColor: "grey", |
| 20 | + display: "inline-block", |
| 21 | + }} |
| 22 | + /> |
| 23 | + </div> |
| 24 | +); |
| 25 | + |
| 26 | +const Wrapper = styled.div` |
| 27 | + ${withTokens( |
| 28 | + "spacing-xs", |
| 29 | + "marging-s", |
| 30 | + "colors-content-default-default", |
| 31 | + "colors-surface-transparent-hover", |
| 32 | + "colors-surface-transparent-pressed", |
| 33 | + )} |
| 34 | + display: flex; |
| 35 | + padding: var(--spacing-xs); |
| 36 | + cursor: pointer; |
| 37 | +
|
| 38 | + :hover { |
| 39 | + background-color: var(--colors-surface-transparent-hover); |
| 40 | + } |
| 41 | +
|
| 42 | + :active { |
| 43 | + background-color: var(--colors-surface-transparent-pressed); |
| 44 | + } |
| 45 | +`; |
| 46 | + |
| 47 | +const InfoWrapper = styled.div` |
| 48 | + display: flex; |
| 49 | + flex-direction: column; |
| 50 | + justify-content: center; |
| 51 | + margin-left: var(--marging-s); |
| 52 | +`; |
| 53 | + |
| 54 | +export const NetworkItem = ({ name, onClick }: NetworkItemProps) => { |
| 55 | + return ( |
| 56 | + <Wrapper onClick={onClick}> |
| 57 | + <TempAssetBadge /> |
| 58 | + <InfoWrapper> |
| 59 | + <Text |
| 60 | + variant="largeLineHeight" |
| 61 | + fontWeight="semiBold" |
| 62 | + color="var(--colors-content-default-default)" |
| 63 | + > |
| 64 | + {name} |
| 65 | + </Text> |
| 66 | + </InfoWrapper> |
| 67 | + </Wrapper> |
| 68 | + ); |
| 69 | +}; |
0 commit comments