Skip to content
This repository was archived by the owner on Jan 6, 2022. It is now read-only.

Commit f3aceb9

Browse files
committed
fix: buttons will click now
1 parent 27512f9 commit f3aceb9

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

app/components/button.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ import React from 'react'
44
import styled from 'styled-components'
55

66
const BaseButton = styled.button.attrs(props => ({
7-
...props,
8-
onClick: props => {
9-
if (props.trigger) {
10-
return function (e) {
11-
e.stopPropagation()
12-
props.trigger.apply(this, [e])
13-
}
14-
}
15-
return undefined
16-
}
7+
...props
178
}))`
189
text-transform: uppercase;
1910
letter-spacing: 0.025em;

app/components/finder-button.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ const FinderButton = ({ dat, onClick }) => (
1010
<Button.Icon
1111
icon={<Icon name='open-in-finder' />}
1212
className='row-action btn-finder'
13-
trigger={() => shell.openExternal(`file://${resolve(dat.path)}`, () => {})}
13+
onClick={(ev) => {
14+
ev.stopPropagation()
15+
shell.openExternal(`file://${resolve(dat.path)}`, () => {})
16+
}}
1417
/>
1518
)
1619

0 commit comments

Comments
 (0)