Add ItemCountView

This commit is contained in:
Bill 2021-11-17 03:47:06 -05:00
parent 93146541db
commit e7dfb381ff
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,6 @@
.nitro-item-count {
top: 2px;
right: 2px;
font-size: 8px;
z-index: 1;
}

View File

@ -0,0 +1,9 @@
import { FC } from 'react';
import { ItemCountViewProps } from './ItemCountView.types';
export const ItemCountView: FC<ItemCountViewProps> = props =>
{
const { count = 0 } = props;
return <div className="position-absolute badge border bg-danger px-1 rounded-circle nitro-item-count">{ count }</div>
}

View File

@ -0,0 +1,4 @@
export interface ItemCountViewProps
{
count: number;
}