Merge pull request #10682 from overleaf/ds-btn-default-to-secondary-in-editor-part-2

Replacing btn-default with btn-secondary in the editor Part-2

GitOrigin-RevId: 708aa29070bb3049afbc8ee1a282eaa1018594a8
This commit is contained in:
Davinder Singh
2022-12-08 09:03:42 +00:00
committed by Copybot
parent d6b39c4bb3
commit 4adfca52bf
12 changed files with 44 additions and 17 deletions
@@ -123,7 +123,7 @@ script(type="text/ng-template", id="historyV2AddLabelModalTemplate")
| #{translate("history_new_label_added_at")} | #{translate("history_new_label_added_at")}
strong {{ update.meta.end_ts | formatDate:'ddd Do MMM YYYY, h:mm a' }} strong {{ update.meta.end_ts | formatDate:'ddd Do MMM YYYY, h:mm a' }}
.modal-footer .modal-footer
button.btn.btn-default( button.btn.btn-secondary(
type="button" type="button"
ng-disabled="state.inflight" ng-disabled="state.inflight"
ng-click="$dismiss()" ng-click="$dismiss()"
@@ -90,7 +90,9 @@ export default function DictionaryModalContent({
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
<Button onClick={handleHide}>{t('done')}</Button> <Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
{t('done')}
</Button>
</Modal.Footer> </Modal.Footer>
</> </>
) )
@@ -248,7 +248,7 @@ function UploadConflicts({ cancel, conflicts, handleOverwrite }) {
Overwrite Overwrite
</Button> </Button>
&nbsp; &nbsp;
<Button bsStyle="primary" onClick={cancel}> <Button bsStyle={null} className="btn-secondary" onClick={cancel}>
Cancel Cancel
</Button> </Button>
</p> </p>
@@ -81,7 +81,13 @@ function FileTreeModalCreateFolder() {
</Button> </Button>
) : ( ) : (
<> <>
<Button onClick={handleHide}>{t('cancel')}</Button> <Button
bsStyle={null}
className="btn-secondary"
onClick={handleHide}
>
{t('cancel')}
</Button>
<Button <Button
bsStyle="primary" bsStyle="primary"
onClick={handleCreateFolder} onClick={handleCreateFolder}
@@ -54,7 +54,13 @@ function FileTreeModalDelete() {
</Button> </Button>
) : ( ) : (
<> <>
<Button onClick={handleHide}>{t('cancel')}</Button> <Button
bsStyle={null}
className="btn-secondary"
onClick={handleHide}
>
{t('cancel')}
</Button>
<Button bsStyle="danger" onClick={handleDelete}> <Button bsStyle="danger" onClick={handleDelete}>
{t('delete')} {t('delete')}
</Button> </Button>
@@ -197,7 +197,9 @@ export default function HotkeysModal({
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
<Button onClick={handleHide}>{t('ok')}</Button> <Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
{t('ok')}
</Button>
</Modal.Footer> </Modal.Footer>
</AccessibleModal> </AccessibleModal>
) )
@@ -40,8 +40,8 @@ export default function PdfLogEntryRawContent({
> >
<Button <Button
bsSize="xs" bsSize="xs"
bsStyle="default" bsStyle={null}
className="log-entry-btn-expand-collapse" className="log-entry-btn-expand-collapse btn-secondary"
onClick={() => setExpanded(value => !value)} onClick={() => setExpanded(value => !value)}
> >
{expanded ? ( {expanded ? (
@@ -27,7 +27,7 @@ function GoToCodeButton({
}) { }) {
const { t } = useTranslation() const { t } = useTranslation()
const tooltipPlacement = isDetachLayout ? 'bottom' : 'right' const tooltipPlacement = isDetachLayout ? 'bottom' : 'right'
const buttonClasses = classNames('synctex-control', { const buttonClasses = classNames('synctex-control', 'btn-secondary', {
'detach-synctex-control': !!isDetachLayout, 'detach-synctex-control': !!isDetachLayout,
}) })
@@ -45,7 +45,7 @@ function GoToCodeButton({
overlayProps={{ placement: tooltipPlacement }} overlayProps={{ placement: tooltipPlacement }}
> >
<Button <Button
bsStyle="default" bsStyle={null}
bsSize="xs" bsSize="xs"
onClick={() => syncToCode(position, 72)} onClick={() => syncToCode(position, 72)}
disabled={syncToCodeInFlight} disabled={syncToCodeInFlight}
@@ -68,9 +68,14 @@ function GoToPdfButton({
}) { }) {
const { t } = useTranslation() const { t } = useTranslation()
const tooltipPlacement = isDetachLayout ? 'bottom' : 'right' const tooltipPlacement = isDetachLayout ? 'bottom' : 'right'
const buttonClasses = classNames('synctex-control', 'toolbar-btn-secondary', { const buttonClasses = classNames(
'detach-synctex-control': !!isDetachLayout, 'synctex-control',
}) 'btn-secondary',
'toolbar-btn-secondary',
{
'detach-synctex-control': !!isDetachLayout,
}
)
let buttonIcon = null let buttonIcon = null
if (syncToPdfInFlight) { if (syncToPdfInFlight) {
@@ -86,7 +91,7 @@ function GoToPdfButton({
overlayProps={{ placement: tooltipPlacement }} overlayProps={{ placement: tooltipPlacement }}
> >
<Button <Button
bsStyle="default" bsStyle={null}
bsSize="xs" bsSize="xs"
onClick={() => syncToPdf(cursorPosition)} onClick={() => syncToPdf(cursorPosition)}
disabled={syncToPdfInFlight || !cursorPosition || !hasSingleSelectedDoc} disabled={syncToPdfInFlight || !cursorPosition || !hasSingleSelectedDoc}
@@ -46,7 +46,8 @@ export default function ShareProjectModalContent({
<Button <Button
type="button" type="button"
onClick={cancel} onClick={cancel}
bsStyle="default" bsStyle={null}
className="btn-secondary"
disabled={inFlight} disabled={inFlight}
> >
<Trans i18nKey="close" /> <Trans i18nKey="close" />
@@ -61,7 +61,8 @@ export default function TransferOwnershipModal({ member, cancel }) {
<div className="modal-footer-right"> <div className="modal-footer-right">
<Button <Button
type="button" type="button"
bsStyle="default" bsStyle={null}
className="btn-secondary"
onClick={cancel} onClick={cancel}
disabled={inflight} disabled={inflight}
> >
@@ -76,7 +76,9 @@ export default function WordCountModalContent({ handleHide }) {
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
<Button onClick={handleHide}>{t('done')}</Button> <Button bsStyle={null} className="btn-secondary" onClick={handleHide}>
{t('done')}
</Button>
</Modal.Footer> </Modal.Footer>
</> </>
) )
@@ -425,6 +425,8 @@
padding: 0 0 2px; padding: 0 0 2px;
background-color: fade(@btn-default-bg, 80%); background-color: fade(@btn-default-bg, 80%);
transition: background 0.15s ease; transition: background 0.15s ease;
color: white;
border-color: transparent;
&:focus:not(:focus-visible) { &:focus:not(:focus-visible) {
outline: none; outline: none;