Skip to content

Commit

Permalink
feat(typography): extend typography component to accept html props (#136
Browse files Browse the repository at this point in the history
)
  • Loading branch information
PriscillaSam committed Feb 6, 2023
1 parent 5c416b0 commit 70a614a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/typography/src/Typography.types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import React, { HTMLAttributes } from 'react';

import { defaultVariantMapping } from './Typography.constants';

type DefaultMapKeys = keyof typeof defaultVariantMapping;

export interface TypographyProps {
export interface ComponentProps {
/**
* `children` of the element
*/
Expand All @@ -26,3 +26,5 @@ export interface TypographyProps {
*/
Component?: React.ElementType;
}

export type TypographyProps = ComponentProps & HTMLAttributes<HTMLElement>;

1 comment on commit 70a614a

@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 70a614a

Please sign in to comment.