Skip to content

Commit

Permalink
fix: added ux fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenCoogan committed Jan 9, 2025
1 parent 47416a4 commit da91af9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions addon/components/hyper-table/cell-renderers/list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
<div class="expandable-list">
{{#each this.value as |item|}}
<div
class="expandable-list__item fx-row fx-xalign-center fx-gap-px-6"
{{on "click" (action "goToUrl" (concat this.url item.id) bubbles=false)}}
class="expandable-list__item
{{if item.locked 'expandable-list__item-disabled '}}fx-row fx-xalign-center fx-gap-px-6"
{{on "click" (action "goToUrl" (concat this.url item.id) item.locked bubbles=false)}}
>
{{item.name}}
{{#if item.locked}}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/hyper-table/cell-renderers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default Component.extend(CellRendererMixin, {
}),

actions: {
goToUrl(url, event) {
if (!this.url) {
goToUrl(url, locked, event) {
if (!this.url || locked) {
event.preventDefault();
event.stopPropagation();
return;
Expand Down
6 changes: 6 additions & 0 deletions app/styles/cells.less
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@
padding: var(--spacing-px-12) var(--spacing-px-18);
cursor: pointer;

&-disabled {
&:hover {
cursor: not-allowed;
}
}

&:hover {
background-color: var(--color-gray-100);
}
Expand Down

0 comments on commit da91af9

Please sign in to comment.