2024-12-13 16:38:41 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import Stack from '@mui/material/Stack';
|
|
|
|
|
import Typography from '@mui/material/Typography';
|
2026-06-02 15:00:39 +02:00
|
|
|
import type { ReactNode } from 'react';
|
2025-08-16 02:48:46 +02:00
|
|
|
|
2026-01-10 19:45:02 +01:00
|
|
|
interface SuperscriptProps {
|
|
|
|
|
superscript: string;
|
2026-06-02 15:00:39 +02:00
|
|
|
text: ReactNode;
|
2026-01-10 19:45:02 +01:00
|
|
|
}
|
2024-12-13 16:38:41 +01:00
|
|
|
|
|
|
|
|
/**
|
2026-01-10 19:45:02 +01:00
|
|
|
* Displays a text with a superscript portion.
|
2024-12-13 16:38:41 +01:00
|
|
|
*/
|
2026-01-10 19:45:02 +01:00
|
|
|
export const Superscript = ({ superscript, text }: SuperscriptProps) => (
|
|
|
|
|
<Stack sx={{ flexDirection: 'row', gap: 0.25 }}>
|
|
|
|
|
{text}
|
|
|
|
|
<Typography variant="caption" sx={{ fontSize: 'x-small', opacity: 0.75 }}>
|
|
|
|
|
{superscript}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Stack>
|
|
|
|
|
);
|