mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-29 03:53:03 +00:00
refactor: batch 2
This commit is contained in:
20
src/components/Ruby.tsx
Normal file
20
src/components/Ruby.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user