silphius/app/react/components/dom/bag.jsx

29 lines
521 B
React
Raw Normal View History

2024-07-23 23:27:08 -05:00
import styles from './bag.module.css';
2024-07-28 08:06:08 -05:00
import Grid from './grid.jsx';
2024-07-23 23:27:08 -05:00
/**
* Inventory bag. 10-40 slots of inventory.
*/
export default function Bag({
isInventoryOpen,
2024-07-28 08:06:08 -05:00
onActivate,
2024-07-23 23:27:08 -05:00
slots,
}) {
return (
<div
className={styles.bag}
2024-07-28 08:06:08 -05:00
style={isInventoryOpen ? {transition: 'opacity 50ms'} : {opacity: 0, left: '-440px'}}
2024-07-23 23:27:08 -05:00
>
2024-07-28 08:06:08 -05:00
<Grid
color="rgba(02, 02, 28, 0.6)"
columns={10}
label="Bag"
onActivate={onActivate}
slots={slots}
/>
2024-07-23 23:27:08 -05:00
</div>
);
}