@@ -68,55 +63,43 @@ const PlaybackTimer = (props) => {
>
)}
-
-
-
-
-
-
-
-
+
-
-
+ square>
+ -1
+
+
+
+ setPlayback.delay(-5)}
+ disabled={disableButtons}
+ square>
+ 1
+
+
+
+ setPlayback.delay(-5)}
+ disabled={disableButtons}
+ square>
+ 5
+
);
};
-
-export default memo(PlaybackTimer, areEqual);
-
-PlaybackTimer.propTypes = {
- playback: PropTypes.string,
- handleIncrement: PropTypes.func.isRequired,
- selectedId: PropTypes.string,
-};
diff --git a/client/src/features/control/playback/TapButton.module.scss b/client/src/features/control/playback/TapButton.module.scss
new file mode 100644
index 000000000..f208c59e8
--- /dev/null
+++ b/client/src/features/control/playback/TapButton.module.scss
@@ -0,0 +1,65 @@
+@use '../../../theme/main' as *;
+
+@mixin tap-factory($theme-front, $theme-bg, $theme-high) {
+ font-family: "Open Sans", sans-serif;
+ font-size: 22px;
+ background-color: $theme-bg;
+ color: $theme-front;
+ border-radius: 3px;
+ width: 100%;
+ aspect-ratio: 3/1;
+ box-shadow: $theme-high 0 0 2px;
+ transition: background-color 0.3s;
+ display: grid;
+ place-content: center;
+
+ &:disabled {
+ cursor: not-allowed;
+ background-color: $opacity-disabled;
+ box-shadow: none;
+ opacity: $opacity-disabled;
+ }
+
+ &:hover:not(:disabled) {
+ background-color: $theme-high;
+ }
+
+ &:active:not(:disabled) {
+ color: $theme-bg;
+ background-color: $theme-front;
+ transition: background-color 0.15s;
+ }
+
+ &.active {
+ background-color: $theme-high;
+ }
+}
+
+.tapButton.neutral{
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, #363636);
+}
+
+.tapButton.start {
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, $ontime-accent);
+}
+
+.tapButton.roll {
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, $ontime-roll);
+}
+
+.tapButton.pause {
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, $ontime-paused);
+}
+
+.tapButton.ontime {
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, $ontime-pink);
+}
+
+.tapButton.stop {
+ @include tap-factory(rgba(255, 255, 255, 0.867), #303030, $ontime-red);
+}
+
+.tapButton.square {
+ aspect-ratio: 1;
+ font-size: 14px;
+}
diff --git a/client/src/features/control/playback/TapButton.tsx b/client/src/features/control/playback/TapButton.tsx
new file mode 100644
index 000000000..6c0a18e35
--- /dev/null
+++ b/client/src/features/control/playback/TapButton.tsx
@@ -0,0 +1,31 @@
+import { ForwardedRef, forwardRef, PropsWithChildren } from 'react';
+
+import { Playstate } from '../../../common/models/OntimeTypes';
+
+import style from './TapButton.module.scss';
+
+interface TapButtonProps {
+ disabled?: boolean;
+ square?: boolean;
+ onClick: () => void;
+ theme?: Playstate | 'neutral';
+ active?: boolean;
+}
+
+const TapButton = forwardRef((props: PropsWithChildren