import React from 'react'; import { Skeleton } from 'antd'; import { Chart, Interval, Coordinate, Legend, View, Annotation, } from 'bizcharts'; function Ring(props) { const { used = 0, add = 1, reserved = 0, limit = 1 } = props; const left = limit - used - reserved - add; const data = [ { type: t('Used'), value: used, color: '#5B8FF9', }, ]; if (reserved) { data.push({ type: t('Reserved'), value: reserved, color: '#5D7092', }); } data.push({ type: t('New'), value: add, color: '#5AD8A6', }); data.push({ type: t('Left'), value: left, color: '#eee', }); const colors = data.map((it) => it.color); return (
{t('Quota')}: {t('Unlimit')}
{t('Used')}:: {used}
{!!reserved && ({t('Reserved')}:: {reserved}
)}{t('New')}:: {add}