Skip to content

Commit

Permalink
feat: implement Orbit button style [PT-188162613]
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanik committed Aug 27, 2024
1 parent d3829df commit e8b69c3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
27 changes: 27 additions & 0 deletions src/grasp-seasons/components/seasons.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "../../components/vars.scss";

.grasp-seasons {
font-size: 12px;
color: #222;
Expand Down Expand Up @@ -226,4 +228,29 @@
margin-left:6px;
}
}

.orbit-button-bg {
background-color: #fff;
border-radius: 3px;
margin-right: 10px;
}

.orbit-button {
@include rect-button;
& {
width: 80px;
background-color: white;
padding-left: 33px;
}
&:hover {
background-color: $teal-light-25;
}
&:active {
background-color: $teal-light-50;
}
svg {
position: absolute;
left: 7px;
}
}
}
19 changes: 12 additions & 7 deletions src/grasp-seasons/components/seasons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { ILocation } from "../../types";

import ForwardBackIcon from "../../assets/images/forward-back-icon.svg";
import ForwardBackJumpIcon from "../../assets/images/forward-back-jump-icon.svg";
import PlayIcon from "../../assets/images/play-icon.svg";
import PauseIcon from "../../assets/images/pause-icon.svg";

import "./seasons.scss";

Expand Down Expand Up @@ -269,13 +271,16 @@ const Seasons: React.FC<IProps> = ({ lang = "en_us", initialState = {}, log = (a
/>
</div>
<div className="playback-controls">
<button
className="btn btn-default animation-btn"
name={playStopLabel}
onClick={toggleMainAnimation}
>
{ playStopLabel }
</button>
<div className="orbit-button-bg">
<button
className="orbit-button"
name={playStopLabel}
onClick={toggleMainAnimation}
>
{ mainAnimationStarted ? <PauseIcon /> : <PlayIcon /> }
{ playStopLabel }
</button>
</div>
<label>
<input
type="checkbox"
Expand Down
2 changes: 1 addition & 1 deletion src/grasp-seasons/translation/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
"~GROUND": "Ground",
"~SPACE": "Space",
"~NOTHING": "Nothing",
"~STOP": "Stop",
"~STOP": "Pause",
"~DIR_NORTH": "N",
"~DIR_SOUTH": "S",
"~DIR_EAST": "E",
Expand Down

0 comments on commit e8b69c3

Please sign in to comment.