refactor: batch 2

This commit is contained in:
鲁树人
2025-05-17 11:20:52 +09:00
parent 246ba48135
commit 75b43e1e84
16 changed files with 384 additions and 272 deletions

20
src/components/Ruby.tsx Normal file
View File

@@ -0,0 +1,20 @@
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>
);
}