styles: fix menu spacing and make tag list scrollable
This commit is contained in:
@@ -36,14 +36,14 @@ export const NotesOptions = observer(
|
|||||||
const iconClass = 'fill-current color-neutral mr-2';
|
const iconClass = 'fill-current color-neutral mr-2';
|
||||||
const buttonClass =
|
const buttonClass =
|
||||||
'flex items-center border-0 focus:inner-ring-info ' +
|
'flex items-center border-0 focus:inner-ring-info ' +
|
||||||
'cursor-pointer hover:bg-contrast color-text bg-transparent h-10 px-3 ' +
|
'cursor-pointer hover:bg-contrast color-text bg-transparent px-3 py-1.5 ' +
|
||||||
'text-left';
|
'text-left';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Switch
|
<Switch
|
||||||
onBlur={closeOnBlur}
|
onBlur={closeOnBlur}
|
||||||
className="h-10"
|
className="px-3 py-1.5"
|
||||||
checked={locked}
|
checked={locked}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
appState.notes.setLockSelectedNotes(!locked);
|
appState.notes.setLockSelectedNotes(!locked);
|
||||||
@@ -56,7 +56,7 @@ export const NotesOptions = observer(
|
|||||||
</Switch>
|
</Switch>
|
||||||
<Switch
|
<Switch
|
||||||
onBlur={closeOnBlur}
|
onBlur={closeOnBlur}
|
||||||
className="h-10"
|
className="px-3 py-1.5"
|
||||||
checked={!hidePreviews}
|
checked={!hidePreviews}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
appState.notes.setHideSelectedNotePreviews(!hidePreviews);
|
appState.notes.setHideSelectedNotePreviews(!hidePreviews);
|
||||||
@@ -112,7 +112,7 @@ export const NotesOptions = observer(
|
|||||||
style={{
|
style={{
|
||||||
...tagsMenuPosition,
|
...tagsMenuPosition,
|
||||||
}}
|
}}
|
||||||
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px"
|
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px max-h-80 overflow-y-scroll"
|
||||||
>
|
>
|
||||||
{appState.tags.tags.map((tag) => (
|
{appState.tags.tags.map((tag) => (
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const NotesOptionsPanel = observer(({ appState }: Props) => {
|
|||||||
style={{
|
style={{
|
||||||
...position,
|
...position,
|
||||||
}}
|
}}
|
||||||
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px"
|
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265"
|
||||||
>
|
>
|
||||||
<NotesOptions
|
<NotesOptions
|
||||||
appState={appState}
|
appState={appState}
|
||||||
|
|||||||
@@ -45,6 +45,11 @@
|
|||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.py-1\.5 {
|
||||||
|
padding-top: 0.375rem;
|
||||||
|
padding-bottom: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
.outline-none {
|
.outline-none {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@@ -94,10 +99,6 @@
|
|||||||
max-width: 265px;
|
max-width: 265px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h-32px {
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.h-1px {
|
.h-1px {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
@@ -106,6 +107,14 @@
|
|||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.max-h-80 {
|
||||||
|
max-height: 20rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overflow-y-scroll {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A button that is just an icon. Separated from .sn-button because there
|
* A button that is just an icon. Separated from .sn-button because there
|
||||||
* is almost no style overlap.
|
* is almost no style overlap.
|
||||||
|
|||||||
Reference in New Issue
Block a user