update energy

This commit is contained in:
lb
2024-01-25 15:19:27 +08:00
parent 2fb3d05f8c
commit 6e10a5aacd
8 changed files with 257 additions and 107 deletions

View File

@@ -1,12 +1,28 @@
import cls from './index.module.css';
import cls from "./index.module.css";
const Arrow = ({direction, disabled, onClick}) => {
return (
<div className={cls["arrow"]}>
<div className={cls['arrow-top']}></div>
<div className={cls["arrow-bottom"]}></div>
</div>
)
}
const Arrow = ({ direction, disabled, onClick }) => {
function handleClick() {
onClick(direction)
}
return (
<button
className={`${cls["arrow"]} ${
direction == "right" ? cls["arrow__right"] : ""
} ${true ? "disabled" : ""}`}
onClick={handleClick}
>
<div
className={`${cls["arrow-top"]} ${
direction == "right" ? cls["arrow-top__right"] : ""
}`}
></div>
<div
className={`${cls["arrow-bottom"]} ${
direction == "right" ? cls["arrow-bottom__right"] : ""
}`}
></div>
</button>
);
};
export default Arrow;
export default Arrow;