mirror of
https://github.com/mue/mue.git
synced 2026-07-16 21:44:22 +02:00
46 lines
1003 B
JavaScript
46 lines
1003 B
JavaScript
import { useT } from 'contexts';
|
|
import QuoteButtons from './QuoteButtons';
|
|
|
|
/**
|
|
* Author information component (legacy style)
|
|
*/
|
|
export default function AuthorInfoLegacy({
|
|
author,
|
|
authorlink,
|
|
onCopy,
|
|
onFavourite,
|
|
onShare,
|
|
isFavourited,
|
|
}) {
|
|
const t = useT();
|
|
return (
|
|
<>
|
|
<div>
|
|
<h1 className="quoteauthor">
|
|
{authorlink ? (
|
|
<a
|
|
href={authorlink}
|
|
className="quoteAuthorLink"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
aria-label={t('widgets.quote.author_info_aria')}
|
|
>
|
|
{author}
|
|
</a>
|
|
) : (
|
|
<span>{author}</span>
|
|
)}
|
|
</h1>
|
|
</div>
|
|
<div style={{ display: 'flex', justifyContent: 'center', gap: '20px' }}>
|
|
<QuoteButtons
|
|
onCopy={onCopy}
|
|
onFavourite={onFavourite}
|
|
onShare={onShare}
|
|
isFavourited={isFavourited}
|
|
/>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|