Skip to content

Commit

Permalink
Update Controls.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
mikumino committed Nov 25, 2023
1 parent c5ab315 commit 3009eb6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/Controls.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
interface ControlsProps {
handleStart: () => void;
handleStop: () => void;
handleReset: () => void;
isRunning: boolean;
}

const Controls = ({ handleStart, handleStop, handleReset, isRunning }: ControlsProps) => {
return (
<div className="flex flex-row items-center justify-center">
<button className="btn btn-circle btn-primary mr-4" onClick={handleStart}><iconify-icon icon={isRunning ? 'ph:pause-fill' : 'ph:play-fill'} /></button>
<button className="btn btn-circle btn-outline btn-primary mr-4" onClick={handleStop}><iconify-icon icon="ph:stop-fill" /></button>
<button className="btn btn-circle btn-outline" onClick={handleReset}><iconify-icon icon="solar:restart-broken"></iconify-icon></button>
</div>
);
}

export default Controls;

0 comments on commit 3009eb6

Please sign in to comment.