mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
22 lines
544 B
TypeScript
22 lines
544 B
TypeScript
import Overlay from '@/components/Common/Overlay';
|
||
|
||
interface SelectedCounterProps {
|
||
total: number;
|
||
selected: number;
|
||
position?: string;
|
||
hideZero?: boolean;
|
||
}
|
||
|
||
function SelectedCounter({ total, selected, hideZero, position = 'top-0 left-0' }: SelectedCounterProps) {
|
||
if (selected === 0 && hideZero) {
|
||
return null;
|
||
}
|
||
return (
|
||
<Overlay position={`px-2 ${position}`} className='select-none whitespace-nowrap small-caps clr-app'>
|
||
Выбор {selected} из {total}
|
||
</Overlay>
|
||
);
|
||
}
|
||
|
||
export default SelectedCounter;
|