mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
* Merge intermediate component wrappers into OL-prefixed components * Replace all intermediate wrapper consumers with OL-prefixed components directly * Fix jsx/js files still importing deleted shim components * Remove duplicate OLNotification imports left by first pass * Rename OLTagIcon to TagIcon, remove OL prefix * Rename OLDropdownMenuItem to DropdownMenuItem, remove OL prefix * Remove OLNotification, use Notification directly * Move Notification to the main shared component folder * Update tag-icon import path out of ol/ * Move TagIcon to the main shared component folder * Update dropdown-menu-item import path out of ol/ * Move DropdownMenuItem to the main shared component folder * Fix dropdown-menu-item import path to dropdown/ subfolder * Remove BS5 alias prefixes from shared components * Restore notification-list wrapper in Notification component * Add translation for loading button * Remove redundant import aliasing * Resolve conflicts * Restore notification container `notification-list` GitOrigin-RevId: 24a5af18599a3e02ac6fd61c09cf5a49ef6e0020
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { Card, CardBody, Row, Col } from 'react-bootstrap'
|
|
import OLButton from '@/shared/components/ol/ol-button'
|
|
import MaterialIcon from '@/shared/components/material-icon'
|
|
import getMeta from '@/utils/meta'
|
|
import OLIconButton from '@/shared/components/ol/ol-icon-button'
|
|
import classnames from 'classnames'
|
|
|
|
type RequestStatusProps = {
|
|
icon: string
|
|
title: string
|
|
content?: React.ReactNode
|
|
variant?: 'primary' | 'danger'
|
|
}
|
|
|
|
function RequestStatus({ icon, title, content, variant }: RequestStatusProps) {
|
|
const { t } = useTranslation()
|
|
const groupName = getMeta('ol-groupName')
|
|
|
|
return (
|
|
<div className="container">
|
|
<Row>
|
|
<Col xxl={5} xl={6} lg={7} md={9} className="mx-auto">
|
|
<div className="group-heading" data-testid="group-heading">
|
|
<OLIconButton
|
|
variant="ghost"
|
|
href="/user/subscription"
|
|
size="lg"
|
|
icon="arrow_back"
|
|
accessibilityLabel={t('back_to_subscription')}
|
|
/>
|
|
<h2>{groupName || t('group_subscription')}</h2>
|
|
</div>
|
|
<Card>
|
|
<CardBody className="d-grid gap-3">
|
|
<div
|
|
className={classnames('card-icon', {
|
|
[`text-${variant}`]: variant,
|
|
})}
|
|
>
|
|
<MaterialIcon type={icon} />
|
|
</div>
|
|
<div className="d-grid gap-2 text-center">
|
|
<h3 className="mb-0 fw-bold" data-testid="title">
|
|
{title}
|
|
</h3>
|
|
{content && (
|
|
<div className="card-description-secondary">{content}</div>
|
|
)}
|
|
</div>
|
|
<div className="text-center">
|
|
<OLButton variant="secondary" href="/user/subscription">
|
|
{t('go_to_subscriptions')}
|
|
</OLButton>
|
|
</div>
|
|
</CardBody>
|
|
</Card>
|
|
</Col>
|
|
</Row>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default RequestStatus
|