Skip to content

Commit 5d9d789

Browse files
committed
chore: remove default props
1 parent 98df40f commit 5d9d789

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/components/Parallax/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('Expect the <Parallax> component', () => {
6969

7070
expect(controller.createElement).toBeCalledWith({
7171
el: expect.any(HTMLElement),
72-
props: { disabled: false, translateY: [-100, 100] },
72+
props: { translateY: [-100, 100] },
7373
});
7474
});
7575

@@ -96,7 +96,7 @@ describe('Expect the <Parallax> component', () => {
9696

9797
expect(controller.createElement).toBeCalledWith({
9898
el: expect.any(HTMLElement),
99-
props: { disabled: false, rotate: ['0deg', '100deg'] },
99+
props: { rotate: ['0deg', '100deg'] },
100100
});
101101
});
102102

src/components/Parallax/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@ import { useParallax } from '../../hooks/useParallax';
33
import { ParallaxProps } from '../../types';
44

55
export function Parallax(props: PropsWithChildren<ParallaxProps>) {
6-
const Tag = props.tag;
6+
const Tag = props.tag || 'div';
77
const { ref } = useParallax(props);
88
return (
99
<Tag className={props.className} style={props.style} ref={ref}>
1010
{props.children}
1111
</Tag>
1212
);
1313
}
14-
15-
Parallax.defaultProps = {
16-
disabled: false,
17-
tag: 'div',
18-
};

src/components/ParallaxBanner/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,3 @@ export const ParallaxBanner = ({
9999
</div>
100100
);
101101
};
102-
103-
ParallaxBanner.defaultProps = {
104-
disabled: false,
105-
};

0 commit comments

Comments
 (0)