Commit 800aad2a authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加自定义外部容器样式

parent 81c8a0ce
......@@ -8,14 +8,22 @@ interface AnchorPageItemProps {
* key,实际就是 标签id
*/
itemKey: string,
/**
* 自定义外部样式
*/
customStyle?: React.HTMLAttributes<HTMLDivElement>,
/**
* 自定义外部 className
*/
className?: string,
children?: React.ReactNode,
}
const AnchorPageItem: React.FC<AnchorPageItemProps> = (props: AnchorPageItemProps) => {
const { itemKey, children } = props;
const { itemKey, customStyle, className, children } = props;
return (
<div id={itemKey}>
<div id={itemKey} style={customStyle} className={className}>
{children}
</div>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment