We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 694cc4a commit cdb57bfCopy full SHA for cdb57bf
packages/sdk-components-react-radix/src/accordion.tsx
@@ -7,7 +7,6 @@ import {
7
useState,
8
useEffect,
9
createElement,
10
- type ElementRef,
11
} from "react";
12
import {
13
Root,
@@ -58,7 +57,19 @@ type Props = ComponentPropsWithoutRef<typeof Header> & { tag?: Tag };
58
57
export const AccordionHeader = forwardRef<HTMLHeadingElement, Props>(
59
({ tag: legacyTag, ...props }, ref) => {
60
const tag = getTagFromProps(props) ?? legacyTag ?? defaultTag;
61
- return <Header asChild>{createElement(tag, { ...props, ref })}</Header>;
+ return (
+ <Header asChild>
62
+ {createElement(tag, {
63
+ ...props,
64
+ ref,
65
+ style: {
66
+ ...(props.style || {}),
67
+ marginTop: 0,
68
+ marginBottom: 0,
69
+ },
70
+ })}
71
+ </Header>
72
+ );
73
}
74
);
75
0 commit comments