31 lines
784 B
JavaScript

import React from "react"
import PropTypes from "prop-types"
import { TorrentsStat } from "./torrentsStat"
export const Stat = ({ name, count, torrentCount, torrentCountById }) => (
<div className="col-12 col-md-4 my-2">
<div className="card">
<div className="card-header">
<h3>
{name}
<span className="badge badge-pill badge-info pull-right">{count}</span>
</h3>
</div>
<div className="card-body">
<TorrentsStat
count={count}
torrentCount={torrentCount}
torrentCountById={torrentCountById}
/>
</div>
</div>
</div>
)
Stat.propTypes = {
name: PropTypes.string,
count: PropTypes.number,
torrentCount: PropTypes.number,
torrentCountById: PropTypes.number,
};