Skip to content

Commit a5c71f2

Browse files
Make use of 'pointer-events' css property to make ChildButton un-clickable when it's not visible
1 parent 432a9c1 commit a5c71f2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-floating-button-menu",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "A Customizable Material floating button menu implementation made with styled-component & react",
55
"devDependencies": {
66
"babel-core": "^6.24.1",

src/ChildButton.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const Wrapper = styled('li')(
2626
marginLeft: direction === 'right' ? spacing : 0,
2727
marginRight: direction === 'left' ? spacing : 0,
2828
color: iconColor,
29+
pointerEvents: isOpen ? 'auto' : 'none',
2930
}),
3031
);
3132

0 commit comments

Comments
 (0)