styles: add hover state to ellipsis button and unify search options and ellipsis button styles

This commit is contained in:
Antonella Sgarlatta
2021-05-10 18:58:31 -03:00
parent c2ed6f1913
commit 36bfa4504d
4 changed files with 29 additions and 14 deletions

View File

@@ -26,11 +26,11 @@ export const NotesOptions = observer(
}); });
const notes = Object.values(appState.notes.selectedNotes); const notes = Object.values(appState.notes.selectedNotes);
const hidePreviews = !notes.some((note) => !note.hidePreview); const hidePreviews = notes.some((note) => note.hidePreview);
const locked = !notes.some((note) => !note.locked); const locked = notes.some((note) => note.locked);
const archived = !notes.some((note) => !note.archived); const archived = notes.some((note) => note.archived);
const trashed = !notes.some((note) => !note.trashed); const trashed = notes.some((note) => note.trashed);
const pinned = !notes.some((note) => !note.pinned); const pinned = notes.some((note) => note.pinned);
const tagsButtonRef = useRef<HTMLButtonElement>(); const tagsButtonRef = useRef<HTMLButtonElement>();

View File

@@ -50,14 +50,10 @@ export const NotesOptionsPanel = observer(({ appState }: Props) => {
}} }}
onBlur={closeOnBlur} onBlur={closeOnBlur}
ref={buttonRef} ref={buttonRef}
className={ className="sn-icon-button"
'sn-button outlined ' +
'cursor-pointer w-32px h-32px rounded-full p-0 ' +
'flex justify-center items-center'
}
> >
<VisuallyHidden>Actions</VisuallyHidden> <VisuallyHidden>Actions</VisuallyHidden>
<MoreIcon className="fill-current color-neutral block" /> <MoreIcon className="fill-current block" />
</DisclosureButton> </DisclosureButton>
<DisclosurePanel <DisclosurePanel
onKeyUp={(event) => { onKeyUp={(event) => {

View File

@@ -54,7 +54,7 @@ const SearchOptions = observer(({ appState }: Props) => {
<DisclosureButton <DisclosureButton
ref={buttonRef} ref={buttonRef}
onBlur={closeOnBlur} onBlur={closeOnBlur}
className="sn-icon-button color-neutral hover:color-info" className="sn-icon-button"
> >
<VisuallyHidden>Search options</VisuallyHidden> <VisuallyHidden>Search options</VisuallyHidden>
<TuneIcon className="fill-current block" /> <TuneIcon className="fill-current block" />

View File

@@ -78,6 +78,15 @@
box-shadow: inset 0 0 0 2px var(--sn-stylekit-info-color); box-shadow: inset 0 0 0 2px var(--sn-stylekit-info-color);
} }
.hover\:color-text:hover {
@extend .color-text;
}
.focus\:color-text:focus {
@extend .color-text;
}
.focus\:inner-ring-info:focus { .focus\:inner-ring-info:focus {
@extend .inner-ring-info; @extend .inner-ring-info;
} }
@@ -132,8 +141,14 @@
* is almost no style overlap. * is almost no style overlap.
*/ */
.sn-icon-button { .sn-icon-button {
@extend .border-2; @extend .w-32px;
@extend .border-transparent; @extend .h-32px;
@extend .flex;
@extend .justify-center;
@extend .items-center;
@extend .border-solid;
@extend .border-1;
@extend .border-neutral;
@extend .bg-clip-padding; @extend .bg-clip-padding;
@extend .m-0; @extend .m-0;
@extend .p-0; @extend .p-0;
@@ -141,6 +156,10 @@
@extend .cursor-pointer; @extend .cursor-pointer;
@extend .rounded-full; @extend .rounded-full;
@extend .color-neutral; @extend .color-neutral;
@extend .hover\:color-text;
@extend .focus\:color-text;
@extend .hover\:bg-highlight;
@extend .focus\:bg-highlight;
@extend .focus\:outline-none; @extend .focus\:outline-none;
@extend .focus\:ring-info; @extend .focus\:ring-info;
} }