feat: wrap search option bubbles if not enough space (#918)

This commit is contained in:
Aman Harwara
2022-03-10 20:57:59 +05:30
committed by GitHub
parent b31afee108
commit be6a9fdb34
4 changed files with 7 additions and 16 deletions

View File

@@ -12,8 +12,7 @@ const styles = {
const Bubble = ({ label, selected, onSelect }: BubbleProperties) => (
<span
role="tab"
className={`bubble ${styles.base} ${
className={`${styles.base} ${
selected ? styles.selected : styles.unselected
}`}
onClick={onSelect}

View File

@@ -182,7 +182,7 @@ export const NotesView: FunctionComponent<Props> = observer(
</button>
</div>
<div className="filter-section" role="search">
<div>
<div className="relative">
<input
type="text"
id="search-bar"

View File

@@ -19,11 +19,7 @@ export const SearchOptions = observer(({ appState }: Props) => {
}
return (
<div
role="tablist"
className="search-options justify-center"
onMouseDown={(e) => e.preventDefault()}
>
<div className="search-options" onMouseDown={(e) => e.preventDefault()}>
<Bubble
label="Protected Contents"
selected={includeProtectedContents}