Skip to content

Commit

Permalink
TasksPage: re-code grip-bar (now grab-handle), add move upwards/downw…
Browse files Browse the repository at this point in the history
…ards buttons
  • Loading branch information
shaunanoordin committed Oct 11, 2023
1 parent b13cbc1 commit f2e511c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
16 changes: 11 additions & 5 deletions app/pages/lab-pages-editor/components/TasksPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ function StepItem({ task, taskKey }) {

return (
<li className="step-item">
<div className="grip-bar flex-row spacing-bottom-XS">
<GripIcon color="#A6A7A9" />
<div className="grab-handle flex-row spacing-bottom-XS">
<button aria-label={`Rearrange Page ${stepKey} upwards`} className="plain" type="button">
<span className="fa fa-caret-up" role="img" />
</button>
<GripIcon color="#A6A7A9" /> {/* TODO: add drag/drop functionality. Perhaps this needs to be wider, too. */}
<button aria-label={`Rearrange Page/Step ${stepKey} downwards`} className="plain" type="button">
<span className="fa fa-caret-down" role="img" />
</button>
</div>
<ul className="tasks-list" aria-label={`List of Tasks for Page/Step ${stepKey}`}>
<li className="task-item">
Expand All @@ -87,13 +93,13 @@ function StepItem({ task, taskKey }) {
/>
</span>
<span className="task-text flex-item">{text}</span>
<button aria-label={`Delete Step ${stepKey}`} className="plain" type="button">
<button aria-label={`Delete Page/Step ${stepKey}`} className="plain" type="button">
<span className="fa fa-trash" role="img" />
</button>
<button aria-label={`Copy Step ${stepKey}`} className="plain" type="button">
<button aria-label={`Copy Page/Step ${stepKey}`} className="plain" type="button">
<span className="fa fa-copy" role="img" />
</button>
<button aria-label={`Edit Step ${stepKey}`} className="plain" type="button">
<button aria-label={`Edit Page/Step ${stepKey}`} className="plain" type="button">
<span className="fa fa-pencil" role="img" />
</button>
</div>
Expand Down
5 changes: 4 additions & 1 deletion css/lab-pages-editor.styl
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,12 @@ $fontWeightBoldPlus = 700
font-size: $fontSizeS
font-weight: $fontWeightBold

.grip-bar
.grab-handle
cursor: grab
justify-content: center

&:active
cursor: grabbing

.fa
color: $grey1

0 comments on commit f2e511c

Please sign in to comment.