Skip to content

Commit e1deaa6

Browse files
author
Kubit
committed
Improve replaceContent component
1 parent 3153397 commit e1deaa6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/storybook/replaceContent/replaceContent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ interface IReplaceContent extends AriaType {
1010
height?: string;
1111
id?: string;
1212
role?: ROLES;
13+
as?: React.ElementType;
1314
}
1415

1516
export const ReplaceContent = ({ children, ...props }: IReplaceContent): JSX.Element => {
1617
return (
17-
<ReplaceContentStyled {...props}>
18+
<ReplaceContentStyled as={props.as} {...props}>
1819
{!children ? <span>Replace here your Content</span> : children}
1920
</ReplaceContentStyled>
2021
);

0 commit comments

Comments
 (0)