Skip to content

Commit

Permalink
feat(typography): extend component by allowing restProps (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
PriscillaSam authored Feb 6, 2023
1 parent 6cef472 commit 2d34947
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/typography/src/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ export const Typography: React.FC<TypographyProps> = ({
Component = defaultVariantMapping[variant],
children,
dataTestId,
...restProps
}) => {
const classNames = cn(styles.typography, styles[variant], className);

return (
<Component className={classNames} data-test-id={dataTestId}>
<Component className={classNames} data-test-id={dataTestId} {...restProps}>
{children}
</Component>
);
Expand Down

1 comment on commit 2d34947

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 99.5% 1004/1009
🟢 Branches 89.35% 193/216
🟢 Functions 98.36% 60/61
🟢 Lines 99.67% 920/923

Test suite run success

250 tests passing in 37 suites.

Report generated by 🧪jest coverage report action from 2d34947

Please sign in to comment.