refactor to create play-button for sound items
Play button doesn’t have a ‘touch-outside’ listener to stop sounds. That seems to be ok as other events cause the sound to stop. Both handleClick and handleMouseDown are needed. Must use handleMouseDown for `preventDefault` to skip setting focus on the item. handleClick is needed to prevent the Click from propagating to the item and selecting it.
Showing
- src/components/library-item/library-item.css 0 additions, 39 deletionssrc/components/library-item/library-item.css
- src/components/library-item/library-item.jsx 6 additions, 20 deletionssrc/components/library-item/library-item.jsx
- src/components/library/library.jsx 26 additions, 8 deletionssrc/components/library/library.jsx
- src/components/play-button/icon--play.svg 0 additions, 0 deletionssrc/components/play-button/icon--play.svg
- src/components/play-button/icon--stop.svg 0 additions, 0 deletionssrc/components/play-button/icon--stop.svg
- src/components/play-button/play-button.css 42 additions, 0 deletionssrc/components/play-button/play-button.css
- src/components/play-button/play-button.jsx 148 additions, 0 deletionssrc/components/play-button/play-button.jsx
- src/containers/library-item.jsx 22 additions, 18 deletionssrc/containers/library-item.jsx
Loading
Please register or sign in to comment