mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-29 03:53:03 +00:00
21 lines
356 B
TypeScript
21 lines
356 B
TypeScript
import React from 'react';
|
|
|
|
export interface RubyProps {
|
|
caption: React.ReactNode;
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function Ruby(props: RubyProps) {
|
|
const { caption, children, ...rest } = props;
|
|
|
|
return (
|
|
<ruby {...rest}>
|
|
{children}
|
|
<rp>(</rp>
|
|
<rt>{caption}</rt>
|
|
<rp>)</rp>
|
|
</ruby>
|
|
);
|
|
}
|