Skip to content

Commit 95c6b6b

Browse files
committed
feat(AslantSection): add as parameter
1 parent ff553cc commit 95c6b6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/AslantSection.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { css, SerializedStyles } from '@emotion/react';
2-
import { HTMLProps } from 'react';
2+
import { ElementType, HTMLProps } from 'react';
33

44
type Props = {
55
angle: number;
6+
as?: ElementType;
67
bottomAngle?: number;
78
height: number;
89
bottomHeight?: number;
@@ -12,6 +13,7 @@ type Props = {
1213

1314
export function AslantSection({
1415
css: externalStyles,
16+
as: Section = 'section',
1517
angle,
1618
bottomAngle,
1719
height,
@@ -53,5 +55,5 @@ export function AslantSection({
5355
`;
5456
}
5557
// eslint-disable-next-line react/jsx-props-no-spreading
56-
return <section css={[baseStyles, styles, externalStyles]} {...props} />;
58+
return <Section css={[baseStyles, styles, externalStyles]} {...props} />;
5759
}

0 commit comments

Comments
 (0)