Skip to content

Commit 07f6b82

Browse files
authored
fix props overwrite, naming tweak
1 parent e8870e2 commit 07f6b82

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

website/src/theme/Admonition/Types.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import DefaultAdmonitionTypes from '@theme-original/Admonition/Types';
44

55
const {info: Info} = DefaultAdmonitionTypes;
66

7-
function MyCustomAdmonition(props) {
7+
function ImportantAdmonition({ className, ...rest }) {
88
return (
9-
<Info className={clsx(props.className, 'alert--important')} {...props} />
9+
<Info className={clsx(className, 'alert--important')} {...rest} />
1010
);
1111
}
1212

1313
const AdmonitionTypes = {
1414
...DefaultAdmonitionTypes,
15-
important: MyCustomAdmonition,
15+
important: ImportantAdmonition,
1616
};
1717

1818
export default AdmonitionTypes;

0 commit comments

Comments
 (0)