feat(web): markdown form support submit

This commit is contained in:
zhaoying
2026-04-02 16:03:44 +08:00
parent a52e2137b7
commit 1732fc7af5
4 changed files with 81 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-02 15:16:10
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-25 14:02:17
* @Last Modified time: 2026-04-02 15:41:16
*/
/**
* RbButton Component
@@ -19,11 +19,11 @@ import { Button, type ButtonProps } from 'antd'
/** Button component for rendering buttons in markdown */
const RbButton: FC<ButtonProps> = (props) => {
const { children } = props;
const RbButton: FC<ButtonProps> = ({ children, onClick, ...props }) => {
const size = (props['data-size'] || 'default') as ButtonProps['size']
const type = (props['data-variant'] || 'default') as ButtonProps['type']
return (
<Button>
<Button {...props} size={size} type={type} className="rb:mb-3" onClick={onClick}>
{children}
</Button>
)