diff --git a/services/web/frontend/fonts/material-symbols.css b/services/web/frontend/fonts/material-symbols.css index 5fe529c836..6d29541ba0 100644 --- a/services/web/frontend/fonts/material-symbols.css +++ b/services/web/frontend/fonts/material-symbols.css @@ -29,4 +29,12 @@ direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; + + &.size-2x { + font-size: 2em; + } + + &.rotate-180 { + transform: rotate(180deg); + } } diff --git a/services/web/frontend/fonts/material-symbols/MaterialSymbolsRoundedSlice.woff2 b/services/web/frontend/fonts/material-symbols/MaterialSymbolsRoundedSlice.woff2 index 19f6bfd6db..02b8510f40 100644 Binary files a/services/web/frontend/fonts/material-symbols/MaterialSymbolsRoundedSlice.woff2 and b/services/web/frontend/fonts/material-symbols/MaterialSymbolsRoundedSlice.woff2 differ diff --git a/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx b/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx index 7543878d23..0a0fabf242 100644 --- a/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx +++ b/services/web/frontend/js/features/dictionary/components/dictionary-modal-content.tsx @@ -1,12 +1,20 @@ import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Alert, Button, Modal } from 'react-bootstrap' -import Icon from '../../../shared/components/icon' -import Tooltip from '../../../shared/components/tooltip' import useAsync from '../../../shared/hooks/use-async' import { postJSON } from '../../../infrastructure/fetch-json' import ignoredWords from '../ignored-words' import { debugConsole } from '@/utils/debugging' +import { + OLModalBody, + OLModalFooter, + OLModalHeader, + OLModalTitle, +} from '@/features/ui/components/ol/ol-modal' +import OLTooltip from '@/features/ui/components/ol/ol-tooltip' +import OLNotification from '@/features/ui/components/ol/ol-notification' +import OLButton from '@/features/ui/components/ol/ol-button' +import OLIconButton from '@/features/ui/components/ol/ol-icon-button' +import { bsVersion } from '@/features/utils/bootstrap-5' type DictionaryModalContentProps = { handleHide: () => void @@ -42,13 +50,16 @@ export default function DictionaryModalContent({ return ( <> - - {t('edit_dictionary')} - + + {t('edit_dictionary')} + - + {isError ? ( - {t('generic_something_went_wrong')} + ) : null} {learnedWords?.size > 0 ? ( @@ -56,22 +67,25 @@ export default function DictionaryModalContent({ {[...learnedWords].sort(wordsSortFunction).map(learnedWord => (
  • {learnedWord} - - - + bs3Props={{ bsSize: 'xsmall' }} + icon={ + bsVersion({ + bs5: 'delete', + bs3: 'trash-o', + }) as string + } + accessibilityLabel={t('edit_dictionary_remove')} + /> +
  • ))} @@ -80,13 +94,13 @@ export default function DictionaryModalContent({ {t('edit_dictionary_empty')}

    )} -
    + - - - + + ) } diff --git a/services/web/frontend/js/features/dictionary/components/dictionary-modal.tsx b/services/web/frontend/js/features/dictionary/components/dictionary-modal.tsx index b5e6096732..ad450f65a1 100644 --- a/services/web/frontend/js/features/dictionary/components/dictionary-modal.tsx +++ b/services/web/frontend/js/features/dictionary/components/dictionary-modal.tsx @@ -1,7 +1,7 @@ import React from 'react' import DictionaryModalContent from './dictionary-modal-content' -import AccessibleModal from '../../../shared/components/accessible-modal' import withErrorBoundary from '../../../infrastructure/error-boundary' +import OLModal from '@/features/ui/components/ol/ol-modal' type DictionaryModalProps = { show?: boolean @@ -10,15 +10,15 @@ type DictionaryModalProps = { function DictionaryModal({ show, handleHide }: DictionaryModalProps) { return ( - - + ) } diff --git a/services/web/frontend/js/features/editor-left-menu/components/actions-copy-project.tsx b/services/web/frontend/js/features/editor-left-menu/components/actions-copy-project.tsx index b6c4ac8b18..e8aafb9885 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/actions-copy-project.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/actions-copy-project.tsx @@ -4,6 +4,7 @@ import EditorCloneProjectModalWrapper from '../../clone-project-modal/components import LeftMenuButton from './left-menu-button' import { useLocation } from '../../../shared/hooks/use-location' import * as eventTracking from '../../../infrastructure/event-tracking' +import { bsVersionIcon } from '@/features/utils/bootstrap-5' type ProjectCopyResponse = { project_id: string @@ -30,10 +31,10 @@ export default function ActionsCopyProject() { <> {t('copy_project')} diff --git a/services/web/frontend/js/features/editor-left-menu/components/actions-word-count.tsx b/services/web/frontend/js/features/editor-left-menu/components/actions-word-count.tsx index 6d503b781d..390c50cc0a 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/actions-word-count.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/actions-word-count.tsx @@ -1,10 +1,11 @@ import { useState, useCallback } from 'react' import { useTranslation } from 'react-i18next' -import Tooltip from '../../../shared/components/tooltip' import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context' import WordCountModal from '../../word-count-modal/components/word-count-modal' import LeftMenuButton from './left-menu-button' import * as eventTracking from '../../../infrastructure/event-tracking' +import { bsVersionIcon } from '@/features/utils/bootstrap-5' +import OLTooltip from '@/features/ui/components/ol/ol-tooltip' export default function ActionsWordCount() { const [showModal, setShowModal] = useState(false) @@ -21,15 +22,15 @@ export default function ActionsWordCount() { {pdfUrl ? ( {t('word_count')} ) : ( - - + )} setShowModal(false)} /> diff --git a/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx b/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx index 97c781c623..3059c2eacb 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/download-pdf.tsx @@ -2,9 +2,11 @@ import { useTranslation } from 'react-i18next' import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context' import { useProjectContext } from '../../../shared/context/project-context' import Icon from '../../../shared/components/icon' -import Tooltip from '../../../shared/components/tooltip' import * as eventTracking from '../../../infrastructure/event-tracking' import { isSmallDevice } from '../../../infrastructure/event-tracking' +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' +import MaterialIcon from '@/shared/components/material-icon' +import OLTooltip from '@/features/ui/components/ol/ol-tooltip' export default function DownloadPDF() { const { t } = useTranslation() @@ -27,24 +29,30 @@ export default function DownloadPDF() { rel="noreferrer" onClick={sendDownloadEvent} > - + } + bs5={} + />
    PDF ) } else { return ( -
    - + } + bs5={} + />
    PDF
    -
    + ) } } diff --git a/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx b/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx index 4dbfa1ae42..e2db75024b 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/download-source.tsx @@ -3,6 +3,8 @@ import { useProjectContext } from '../../../shared/context/project-context' import Icon from '../../../shared/components/icon' import * as eventTracking from '../../../infrastructure/event-tracking' import { isSmallDevice } from '../../../infrastructure/event-tracking' +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' +import MaterialIcon from '@/shared/components/material-icon' export default function DownloadSource() { const { t } = useTranslation() @@ -23,7 +25,10 @@ export default function DownloadSource() { rel="noreferrer" onClick={sendDownloadEvent} > - + } + bs5={} + />
    {t('source')} diff --git a/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx b/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx index 86df6c6de2..73dea63d23 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/editor-left-menu.tsx @@ -5,35 +5,63 @@ import { Modal } from 'react-bootstrap' import classNames from 'classnames' import { lazy, memo, Suspense } from 'react' import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner' +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' +import { Offcanvas } from 'react-bootstrap-5' const EditorLeftMenuBody = lazy(() => import('./editor-left-menu-body')) function EditorLeftMenu() { const { leftMenuShown, setLeftMenuShown } = useLayoutContext() - const closeModal = () => { + const closeLeftMenu = () => { setLeftMenuShown(false) } return ( - <> - - - }> - - - - - {leftMenuShown && } - + + + + }> + + + + + {leftMenuShown && } + + } + bs5={ + <> + + + }> + + + + + {leftMenuShown && } + + } + /> ) } diff --git a/services/web/frontend/js/features/editor-left-menu/components/help-contact-us.tsx b/services/web/frontend/js/features/editor-left-menu/components/help-contact-us.tsx index 22b6eba4cb..1103e5af4a 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/help-contact-us.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/help-contact-us.tsx @@ -3,6 +3,7 @@ import { useCallback } from 'react' import * as eventTracking from '../../../infrastructure/event-tracking' import { useContactUsModal } from '../../../shared/hooks/use-contact-us-modal' import LeftMenuButton from './left-menu-button' +import { bsVersionIcon } from '@/features/utils/bootstrap-5' export default function HelpContactUs() { const { modal, showModal } = useContactUsModal() @@ -17,10 +18,10 @@ export default function HelpContactUs() { <> {t('contact_us')} diff --git a/services/web/frontend/js/features/editor-left-menu/components/help-documentation.tsx b/services/web/frontend/js/features/editor-left-menu/components/help-documentation.tsx index 281159768d..eef1556d3e 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/help-documentation.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/help-documentation.tsx @@ -1,5 +1,6 @@ import { useTranslation } from 'react-i18next' import LeftMenuButton from './left-menu-button' +import { bsVersionIcon } from '@/features/utils/bootstrap-5' export default function HelpDocumentation() { const { t } = useTranslation() @@ -9,10 +10,10 @@ export default function HelpDocumentation() { {t('documentation')} diff --git a/services/web/frontend/js/features/editor-left-menu/components/help-show-hotkeys.tsx b/services/web/frontend/js/features/editor-left-menu/components/help-show-hotkeys.tsx index 686547342f..977e201d46 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/help-show-hotkeys.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/help-show-hotkeys.tsx @@ -4,6 +4,7 @@ import * as eventTracking from '../../../infrastructure/event-tracking' import { useProjectContext } from '../../../shared/context/project-context' import HotkeysModal from '../../hotkeys-modal/components/hotkeys-modal' import LeftMenuButton from './left-menu-button' +import { bsVersionIcon } from '@/features/utils/bootstrap-5' export default function HelpShowHotkeys() { const [showModal, setShowModal] = useState(false) @@ -20,10 +21,10 @@ export default function HelpShowHotkeys() { <> {t('show_hotkeys')} diff --git a/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx b/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx index f3274a9b9d..5508120505 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/left-menu-button.tsx @@ -1,20 +1,43 @@ import { PropsWithChildren } from 'react' import Icon from '../../../shared/components/icon' +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' +import MaterialIcon from '@/shared/components/material-icon' type Props = { onClick?: () => void - icon: { + icon?: { type: string fw?: boolean } + svgIcon?: React.ReactElement | null disabled?: boolean disabledAccesibilityText?: string type?: 'button' | 'link' href?: string } +function LeftMenuButtonIcon({ + svgIcon, + icon, +}: { + svgIcon?: React.ReactElement | null + icon?: { type: string; fw?: boolean } +}) { + if (svgIcon) { + return
    {svgIcon}
    + } else if (icon) { + return ( + } + bs5={} + /> + ) + } else return null +} + export default function LeftMenuButton({ children, + svgIcon, onClick, icon, disabled = false, @@ -25,7 +48,7 @@ export default function LeftMenuButton({ if (disabled) { return (
    - + {children} {disabledAccesibilityText ? ( {disabledAccesibilityText} @@ -37,7 +60,7 @@ export default function LeftMenuButton({ if (type === 'button') { return ( ) @@ -49,7 +72,7 @@ export default function LeftMenuButton({ rel="noreferrer" className="left-menu-button" > - + {children} ) diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx index 1a39607e8d..0546d6cf23 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx @@ -1,4 +1,3 @@ -import { Form } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import getMeta from '../../../utils/meta' import SettingsAutoCloseBrackets from './settings/settings-auto-close-brackets' @@ -20,6 +19,7 @@ import SettingsMathPreview from './settings/settings-math-preview' import { useFeatureFlag } from '@/shared/context/split-test-context' import importOverleafModules from '../../../../macros/import-overleaf-module.macro' import { ElementType } from 'react' +import OLForm from '@/features/ui/components/ol/ol-form' const moduleSettings: Array<{ import: { default: ElementType } @@ -38,7 +38,7 @@ export default function SettingsMenu() { return ( <>

    {t('settings')}

    -
    + @@ -58,7 +58,7 @@ export default function SettingsMenu() { - +
    ) } diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx index 5490096e41..de0e34b8c9 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-dictionary.tsx @@ -1,28 +1,31 @@ import { useState } from 'react' -import { Button } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import DictionaryModal from '../../../dictionary/components/dictionary-modal' +import OLButton from '@/features/ui/components/ol/ol-button' +import OLFormGroup from '@/features/ui/components/ol/ol-form-group' +import OLFormLabel from '@/features/ui/components/ol/ol-form-label' export default function SettingsDictionary() { const { t } = useTranslation() const [showModal, setShowModal] = useState(false) return ( -
    - - + setShowModal(false)} /> -
    + ) } diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx index a111f60867..43bbf1648d 100644 --- a/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx +++ b/services/web/frontend/js/features/editor-left-menu/components/settings/settings-menu-select.tsx @@ -1,4 +1,9 @@ +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' +import OLFormGroup from '@/features/ui/components/ol/ol-form-group' +import OLFormLabel from '@/features/ui/components/ol/ol-form-label' +import OLFormSelect from '@/features/ui/components/ol/ol-form-select' import { ChangeEventHandler, useCallback } from 'react' +import { Spinner } from 'react-bootstrap-5' type PossibleValue = string | number | boolean @@ -50,16 +55,32 @@ export default function SettingsMenuSelect({ ) return ( -
    - + + {label} {loading ? ( -

    - -

    + + +

    + } + bs5={ +

    +

    + } + /> ) : ( - + )} -
    + ) } diff --git a/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.jsx b/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.jsx index 593094ba70..e19aba8208 100644 --- a/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.jsx +++ b/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.jsx @@ -1,8 +1,15 @@ -import { Button, Modal, Row, Col } from 'react-bootstrap' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' -import AccessibleModal from '../../../shared/components/accessible-modal' import HotkeysModalBottomText from './hotkeys-modal-bottom-text' +import OLModal, { + OLModalBody, + OLModalFooter, + OLModalHeader, + OLModalTitle, +} from '@/features/ui/components/ol/ol-modal' +import OLButton from '@/features/ui/components/ol/ol-button' +import OLRow from '@/features/ui/components/ol/ol-row' +import OLCol from '@/features/ui/components/ol/ol-col' export default function HotkeysModal({ animation = true, @@ -16,21 +23,16 @@ export default function HotkeysModal({ const ctrl = isMac ? 'Cmd' : 'Ctrl' return ( - - - {t('hotkeys')} - + + + {t('hotkeys')} + - +

    {t('common')}

    - - + + - - + + - - + + - - + +

    {t('navigation')}

    - - + + - - + + - - + + - - + +

    {t('editing')}

    - - + + - + - + - + - + - - + +

    {t('autocomplete')}

    - - + + - - + + - - + + - - + +

    - - + + - - + + {trackChangesVisible && ( <>

    {t('review')}

    - - + + - - + + - - + + - - + + )} -
    + - - - -
    + + + ) } diff --git a/services/web/frontend/js/features/ui/components/ol/ol-button.tsx b/services/web/frontend/js/features/ui/components/ol/ol-button.tsx index 8a77792e65..519526adfe 100644 --- a/services/web/frontend/js/features/ui/components/ol/ol-button.tsx +++ b/services/web/frontend/js/features/ui/components/ol/ol-button.tsx @@ -35,6 +35,7 @@ export function bs3ButtonProps(props: ButtonProps) { disabled: props.isLoading || props.disabled, form: props.form, href: props.href, + id: props.id, target: props.target, rel: props.rel, onClick: props.onClick, diff --git a/services/web/frontend/js/features/ui/components/types/button-props.ts b/services/web/frontend/js/features/ui/components/types/button-props.ts index 433655ae8a..79254434ca 100644 --- a/services/web/frontend/js/features/ui/components/types/button-props.ts +++ b/services/web/frontend/js/features/ui/components/types/button-props.ts @@ -9,6 +9,7 @@ export type ButtonProps = { form?: string leadingIcon?: string | React.ReactNode href?: string + id?: string target?: string rel?: string isLoading?: boolean diff --git a/services/web/frontend/js/features/utils/bootstrap-5.ts b/services/web/frontend/js/features/utils/bootstrap-5.ts index 7b55c89a6a..2f9c4c98f7 100644 --- a/services/web/frontend/js/features/utils/bootstrap-5.ts +++ b/services/web/frontend/js/features/utils/bootstrap-5.ts @@ -12,6 +12,16 @@ export function bsVersion({ bs5, bs3 }: { bs5?: unknown; bs3?: unknown }) { return isBootstrap5() ? bs5 : bs3 } +export const bsVersionIcon = ({ + bs5, + bs3, +}: { + bs5?: { type: string } + bs3?: { type: string; fw?: boolean } +}) => { + return isBootstrap5() ? bs5 : bs3 +} + // get all `aria-*` and `data-*` attributes export const getAriaAndDataProps = (obj: Record) => { return Object.entries(obj).reduce( diff --git a/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.jsx b/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.jsx index ad5f258bff..47d2659676 100644 --- a/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.jsx +++ b/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.jsx @@ -1,10 +1,21 @@ import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' -import { Alert, Button, Modal, Row, Col, Grid } from 'react-bootstrap' import { useIdeContext } from '../../../shared/context/ide-context' import { useProjectContext } from '../../../shared/context/project-context' import { useWordCount } from '../hooks/use-word-count' -import Icon from '../../../shared/components/icon' +import { + OLModalBody, + OLModalFooter, + OLModalHeader, + OLModalTitle, +} from '@/features/ui/components/ol/ol-modal' +import OLNotification from '@/features/ui/components/ol/ol-notification' +import OLRow from '@/features/ui/components/ol/ol-row' +import OLCol from '@/features/ui/components/ol/ol-col' +import OLButton from '@/features/ui/components/ol/ol-button' +import Icon from '@/shared/components/icon' +import { Spinner } from 'react-bootstrap-5' +import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' // NOTE: this component is only mounted when the modal is open export default function WordCountModalContent({ handleHide }) { @@ -15,71 +26,87 @@ export default function WordCountModalContent({ handleHide }) { return ( <> - - {t('word_count')} - + + {t('word_count')} + - + {loading && !error && (
    - + } + bs5={ +
    )} {error && ( - {t('generic_something_went_wrong')} + )} {data && ( - +
    {data.messages && ( - - - -

    {data.messages}

    -
    - -
    + + + {data.messages}

    + } + /> +
    +
    )} - - + +
    {t('total_words')}:
    - - {data.textWords} -
    + + {data.textWords} + - - + +
    {t('headers')}:
    - - {data.headers} -
    + + {data.headers} + - - + +
    {t('math_inline')}:
    - - {data.mathInline} -
    + + {data.mathInline} + - - + +
    {t('math_display')}:
    - - {data.mathDisplay} -
    - + + {data.mathDisplay} + +
    )} -
    + - - - + + ) } diff --git a/services/web/frontend/js/features/word-count-modal/components/word-count-modal.jsx b/services/web/frontend/js/features/word-count-modal/components/word-count-modal.jsx index a55c9f15fa..81f9685fe0 100644 --- a/services/web/frontend/js/features/word-count-modal/components/word-count-modal.jsx +++ b/services/web/frontend/js/features/word-count-modal/components/word-count-modal.jsx @@ -1,22 +1,17 @@ import React from 'react' import PropTypes from 'prop-types' import WordCountModalContent from './word-count-modal-content' -import AccessibleModal from '../../../shared/components/accessible-modal' import withErrorBoundary from '../../../infrastructure/error-boundary' +import OLModal from '@/features/ui/components/ol/ol-modal' const WordCountModal = React.memo(function WordCountModal({ show, handleHide, }) { return ( - + - + ) }) diff --git a/services/web/frontend/js/shared/components/loading-spinner.tsx b/services/web/frontend/js/shared/components/loading-spinner.tsx index b74799744e..f5bdeb34dd 100644 --- a/services/web/frontend/js/shared/components/loading-spinner.tsx +++ b/services/web/frontend/js/shared/components/loading-spinner.tsx @@ -3,13 +3,18 @@ import Icon from './icon' import { useEffect, useState } from 'react' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import { Spinner } from 'react-bootstrap-5' +import classNames from 'classnames' function LoadingSpinner({ + align, delay = 0, loadingText, + size, }: { + align?: 'left' | 'center' delay?: 0 | 500 // 500 is our standard delay loadingText?: string + size?: 'sm' }) { const { t } = useTranslation() @@ -29,6 +34,9 @@ function LoadingSpinner({ return null } + const alignmentClass = + align === 'left' ? 'align-items-start' : 'align-items-center' + return ( } bs5={ -
    +