* Abacus 6: New init, deprecate asset.symbol * deprecate asset.symbol * Update networks constants * filesystem * Update networks.ts * 0.6.0 -> 0.6.3 * Remove Market filter
51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
import styled, { type AnyStyledComponent, css } from 'styled-components';
|
|
|
|
import type { Asset } from '@/constants/abacus';
|
|
import { breakpoints } from '@/styles';
|
|
|
|
import { AssetIcon } from '@/components/AssetIcon';
|
|
import { Icon, IconName } from '@/components/Icon';
|
|
import { TableCell } from '@/components/Table';
|
|
|
|
export const MarketTableCell = ({
|
|
asset,
|
|
marketId,
|
|
showFavorite,
|
|
className,
|
|
}: {
|
|
asset?: Asset;
|
|
marketId: string;
|
|
showFavorite?: boolean;
|
|
className?: string;
|
|
}) => (
|
|
<TableCell
|
|
className={className}
|
|
stacked
|
|
slotLeft={
|
|
<>
|
|
{showFavorite && <Icon iconName={IconName.Star} />}
|
|
<Styled.AssetIcon symbol={asset?.id} />
|
|
</>
|
|
}
|
|
>
|
|
<Styled.Asset>{asset?.name}</Styled.Asset>
|
|
<span>{marketId}</span>
|
|
</TableCell>
|
|
);
|
|
|
|
const Styled: Record<string, AnyStyledComponent> = {};
|
|
|
|
Styled.AssetIcon = styled(AssetIcon)`
|
|
font-size: 1.25rem;
|
|
|
|
@media ${breakpoints.tablet} {
|
|
font-size: 2.25rem;
|
|
}
|
|
`;
|
|
|
|
Styled.Asset = styled.span`
|
|
@media ${breakpoints.tablet} {
|
|
color: var(--color-text-2);
|
|
}
|
|
`;
|