* applied eslint * add locales and lint the project * removed error boundary * updated locales * fix min files * fix locales
21 lines
580 B
TypeScript
21 lines
580 B
TypeScript
import React from 'react';
|
|
import stl from './bar.module.css';
|
|
|
|
function Bar({ className = '', width = 0, avg, domain, color }) {
|
|
return (
|
|
<div className={className}>
|
|
<div className="flex items-center">
|
|
<div
|
|
className={stl.bar}
|
|
style={{ width: `${width > 0 ? width : 5}%`, backgroundColor: color }}
|
|
/>
|
|
<div className="ml-2">
|
|
<span className="font-medium">{`${avg}`}</span>
|
|
</div>
|
|
</div>
|
|
<div className="text-sm leading-3 color-gray-medium">{domain}</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Bar;
|