mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #18514 from overleaf/dp-pdf-toolbar-hover
Add hover state to pdf toolbar buttons GitOrigin-RevId: d58ad739e6454b9e0cdbdbb93c55e58785a9d672
This commit is contained in:
+1
@@ -34,6 +34,7 @@ function PdfHybridDownloadButton() {
|
|||||||
<Button
|
<Button
|
||||||
onClick={handleOnClick}
|
onClick={handleOnClick}
|
||||||
bsStyle="link"
|
bsStyle="link"
|
||||||
|
className="pdf-toolbar-btn"
|
||||||
draggable="false"
|
draggable="false"
|
||||||
disabled={!pdfDownloadUrl}
|
disabled={!pdfDownloadUrl}
|
||||||
download
|
download
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function PdfHybridLogsButton() {
|
|||||||
bsStyle="link"
|
bsStyle="link"
|
||||||
disabled={Boolean(error || stoppedOnFirstError)}
|
disabled={Boolean(error || stoppedOnFirstError)}
|
||||||
active={showLogs}
|
active={showLogs}
|
||||||
className="toolbar-item log-btn"
|
className="pdf-toolbar-btn toolbar-item log-btn"
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
style={{ position: 'relative' }}
|
style={{ position: 'relative' }}
|
||||||
aria-label={showLogs ? t('view_pdf') : t('view_logs')}
|
aria-label={showLogs ? t('view_pdf') : t('view_logs')}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function PDFToolbarButton({
|
|||||||
aria-label={label}
|
aria-label={label}
|
||||||
bsSize="large"
|
bsSize="large"
|
||||||
bsStyle={null}
|
bsStyle={null}
|
||||||
className="pdfjs-toolbar-button"
|
className="pdf-toolbar-btn pdfjs-toolbar-button"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ export default function PdfViewerControlsMenuButton({
|
|||||||
overlayProps={{ placement: 'bottom' }}
|
overlayProps={{ placement: 'bottom' }}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
className="pdfjs-toolbar-popover-button"
|
className="pdf-toolbar-btn pdfjs-toolbar-popover-button"
|
||||||
onClick={togglePopover}
|
onClick={togglePopover}
|
||||||
ref={targetRef}
|
ref={targetRef}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function PdfZoomDropdown({ setZoom, rawScale }: PdfZoomDropdownProps) {
|
|||||||
pullRight
|
pullRight
|
||||||
>
|
>
|
||||||
<Dropdown.Toggle
|
<Dropdown.Toggle
|
||||||
className="btn pdfjs-zoom-dropdown-button small"
|
className="btn pdf-toolbar-btn pdfjs-zoom-dropdown-button small"
|
||||||
value={rawScale}
|
value={rawScale}
|
||||||
title={rawScaleToPercentage(rawScale)}
|
title={rawScaleToPercentage(rawScale)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -118,6 +118,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pdf-toolbar-btn {
|
||||||
|
border-radius: @border-radius-base;
|
||||||
|
&:hover {
|
||||||
|
&:not(:disabled) {
|
||||||
|
background-color: @pdf-toolbar-btn-hover-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pdf {
|
.pdf {
|
||||||
background-color: @pdf-bg;
|
background-color: @pdf-bg;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -955,6 +955,7 @@
|
|||||||
@logs-pane-bg: @neutral-80;
|
@logs-pane-bg: @neutral-80;
|
||||||
@log-line-no-color: #fff;
|
@log-line-no-color: #fff;
|
||||||
@log-hints-color: @neutral-70;
|
@log-hints-color: @neutral-70;
|
||||||
|
@pdf-toolbar-btn-hover-color: rgba(125, 125, 125, 0.2);
|
||||||
|
|
||||||
// Tags
|
// Tags
|
||||||
@tag-border-radius: 9999px;
|
@tag-border-radius: 9999px;
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
@project-rename-link-color: @neutral-70;
|
@project-rename-link-color: @neutral-70;
|
||||||
@project-rename-link-color-hover: @neutral-70;
|
@project-rename-link-color-hover: @neutral-70;
|
||||||
@logs-pane-bg: @neutral-10;
|
@logs-pane-bg: @neutral-10;
|
||||||
|
@pdf-toolbar-btn-hover-color: @neutral-10;
|
||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
@navbar-default-bg: #fff;
|
@navbar-default-bg: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user