import { convertFileSize } from '@/utils'; import { AutoTooltip } from '@gpustack/core-ui'; import { useIntl } from '@umijs/max'; import { Flex } from 'antd'; import React from 'react'; import styled from 'styled-components'; import '../style/gpu-card.less'; const CardWrapper = styled.div` display: flex; gap: 8px; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; border-bottom: 1px solid var(--ant-color-split); padding-bottom: 5px; `; const Header = styled.div` width: 100%; `; const Metric: React.FC<{ label: React.ReactNode; value: React.ReactNode }> = ({ label, value }) => ( {label}: {value} ); const Description = styled.div` display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--ant-color-text-tertiary); `; export const CardContainer: React.FC<{ header?: React.ReactNode; description?: React.ReactNode; }> = ({ header, description }) => { return (
{header}
{description && {description}}
); }; const GPUCard: React.FC<{ data: any; header?: React.ReactNode; info?: React.ReactNode; }> = ({ data, header, info }) => { const intl = useIntl(); return ( [{data.index}] {data.label} ) } description={ info || ( ) } > ); }; export default GPUCard;