fix: Fixed issue where search options weren't selectable on macOS
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { classNames } from '@standardnotes/snjs'
|
||||||
import { FunctionComponent } from 'react'
|
import { FunctionComponent } from 'react'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -13,9 +14,14 @@ const styles = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Bubble: FunctionComponent<Props> = ({ label, selected, onSelect }) => (
|
const Bubble: FunctionComponent<Props> = ({ label, selected, onSelect }) => (
|
||||||
<span role="tab" className={`${styles.base} ${selected ? styles.selected : styles.unselected}`} onClick={onSelect}>
|
<button
|
||||||
|
role="checkbox"
|
||||||
|
aria-checked={selected}
|
||||||
|
className={classNames(styles.base, selected ? styles.selected : styles.unselected)}
|
||||||
|
onClick={onSelect}
|
||||||
|
>
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</button>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default Bubble
|
export default Bubble
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const SearchOptions = ({ searchOptions }: Props) => {
|
|||||||
}, [searchOptions])
|
}, [searchOptions])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div role="tablist" className="mt-3 flex flex-wrap gap-2" onMouseDown={(e) => e.preventDefault()}>
|
<div className="mt-3 flex flex-wrap gap-2" onMouseDown={(e) => e.preventDefault()}>
|
||||||
<Bubble
|
<Bubble
|
||||||
label="Protected Contents"
|
label="Protected Contents"
|
||||||
selected={includeProtectedContents}
|
selected={includeProtectedContents}
|
||||||
|
|||||||
Reference in New Issue
Block a user