Skip to content

Commit

Permalink
Set touch action for mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
clauderic committed Sep 17, 2024
1 parent f7458d9 commit 0a1826e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/stories/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
outline: none;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.10), inset 0 0 1px hsla(203, 50%, 30%, 0.5);
white-space: nowrap;
touch-action: none;
}

button:not([class]):hover {
Expand Down
8 changes: 7 additions & 1 deletion apps/stories/stories/react/icons/DraggableIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import draggableIcon from '../../assets/draggableIcon.svg';

export const DraggableIcon = () => (
<img src={draggableIcon} width="140" alt="Draggable" draggable={false} />
<img
src={draggableIcon}
width="140"
alt="Draggable"
draggable={false}
style={{pointerEvents: 'none'}}
/>
);

0 comments on commit 0a1826e

Please sign in to comment.