Files
um-react/src/components/Ruby.tsx
2025-05-17 11:20:52 +09:00

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>
);
}