This repository has been archived by the owner on Jan 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: typography Component - Introduced ForwardRef (#179)
* refactor: introduced forwardref * refacttor: updated ref's * fix: fixed func's name * fix: fixed snapshots * fix: updated snap
- Loading branch information
1 parent
82d7107
commit a8deeb9
Showing
34 changed files
with
262 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Author /> component should render the component in default state 1`] = `"<ul class=\\"MuiList-root MuiList-padding MuiList-subheader\\"><h6 class=\\"MuiTypography-root css-hyrz44 e1xuehjw0 MuiTypography-subtitle1\\">Author</h6><div class=\\"MuiButtonBase-root MuiListItem-root css-xugzlj e1xuehjw1 MuiListItem-gutters MuiListItem-button\\" tabindex=\\"0\\" role=\\"button\\" aria-disabled=\\"false\\"><a href=\\"mailto:[email protected][email protected]\\" target=\\"_top\\"><div class=\\"MuiAvatar-root\\"><img alt=\\"verdaccio user\\" src=\\"https://www.gravatar.com/avatar/000000\\" class=\\"MuiAvatar-img\\"></div></a><div class=\\"MuiListItemText-root css-1vhg3jx e1xuehjw2\\"><span class=\\"MuiTypography-root MuiListItemText-primary MuiTypography-body1\\">verdaccio user</span></div><span class=\\"MuiTouchRipple-root\\"></span></div></ul>"`; | ||
exports[`<Author /> component should render the component in default state 1`] = `"<ul class=\\"MuiList-root MuiList-padding MuiList-subheader\\"><h6 class=\\"MuiTypography-root css-b8upko e1xuehjw0 MuiTypography-subtitle1\\">Author</h6><div class=\\"MuiButtonBase-root MuiListItem-root css-xugzlj e1xuehjw1 MuiListItem-gutters MuiListItem-button\\" tabindex=\\"0\\" role=\\"button\\" aria-disabled=\\"false\\"><a href=\\"mailto:[email protected][email protected]\\" target=\\"_top\\"><div class=\\"MuiAvatar-root\\"><img alt=\\"verdaccio user\\" src=\\"https://www.gravatar.com/avatar/000000\\" class=\\"MuiAvatar-img\\"></div></a><div class=\\"MuiListItemText-root css-1vhg3jx e1xuehjw2\\"><span class=\\"MuiTypography-root MuiListItemText-primary MuiTypography-body1\\">verdaccio user</span></div><span class=\\"MuiTouchRipple-root\\"></span></div></ul>"`; | ||
exports[`<Author /> component should render the component when there is no author email 1`] = `"<ul class=\\"MuiList-root MuiList-padding MuiList-subheader\\"><h6 class=\\"MuiTypography-root css-hyrz44 e1xuehjw0 MuiTypography-subtitle1\\">Author</h6><div class=\\"MuiButtonBase-root MuiListItem-root css-xugzlj e1xuehjw1 MuiListItem-gutters MuiListItem-button\\" tabindex=\\"0\\" role=\\"button\\" aria-disabled=\\"false\\"><div class=\\"MuiAvatar-root\\"><img alt=\\"verdaccio user\\" src=\\"https://www.gravatar.com/avatar/000000\\" class=\\"MuiAvatar-img\\"></div><div class=\\"MuiListItemText-root css-1vhg3jx e1xuehjw2\\"><span class=\\"MuiTypography-root MuiListItemText-primary MuiTypography-body1\\">verdaccio user</span></div><span class=\\"MuiTouchRipple-root\\"></span></div></ul>"`; | ||
exports[`<Author /> component should render the component when there is no author email 1`] = `"<ul class=\\"MuiList-root MuiList-padding MuiList-subheader\\"><h6 class=\\"MuiTypography-root css-b8upko e1xuehjw0 MuiTypography-subtitle1\\">Author</h6><div class=\\"MuiButtonBase-root MuiListItem-root css-xugzlj e1xuehjw1 MuiListItem-gutters MuiListItem-button\\" tabindex=\\"0\\" role=\\"button\\" aria-disabled=\\"false\\"><div class=\\"MuiAvatar-root\\"><img alt=\\"verdaccio user\\" src=\\"https://www.gravatar.com/avatar/000000\\" class=\\"MuiAvatar-img\\"></div><div class=\\"MuiListItemText-root css-1vhg3jx e1xuehjw2\\"><span class=\\"MuiTypography-root MuiListItemText-primary MuiTypography-body1\\">verdaccio user</span></div><span class=\\"MuiTouchRipple-root\\"></span></div></ul>"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,68 +4,73 @@ exports[`test Developers should render the component for contributors with items | |
<Developers | ||
type="contributors" | ||
> | ||
<Styled(WithStyles(ForwardRef(Typography))) | ||
<Styled(Component) | ||
variant="subtitle1" | ||
> | ||
<WithStyles(ForwardRef(Typography)) | ||
className="css-18tsvng emotion-0" | ||
<ForwardRef(Text) | ||
className="css-48zeoi emotion-0" | ||
variant="subtitle1" | ||
> | ||
<ForwardRef(Typography) | ||
className="css-18tsvng emotion-0" | ||
classes={ | ||
Object { | ||
"alignCenter": "MuiTypography-alignCenter", | ||
"alignJustify": "MuiTypography-alignJustify", | ||
"alignLeft": "MuiTypography-alignLeft", | ||
"alignRight": "MuiTypography-alignRight", | ||
"body1": "MuiTypography-body1", | ||
"body2": "MuiTypography-body2", | ||
"button": "MuiTypography-button", | ||
"caption": "MuiTypography-caption", | ||
"colorError": "MuiTypography-colorError", | ||
"colorInherit": "MuiTypography-colorInherit", | ||
"colorPrimary": "MuiTypography-colorPrimary", | ||
"colorSecondary": "MuiTypography-colorSecondary", | ||
"colorTextPrimary": "MuiTypography-colorTextPrimary", | ||
"colorTextSecondary": "MuiTypography-colorTextSecondary", | ||
"displayBlock": "MuiTypography-displayBlock", | ||
"displayInline": "MuiTypography-displayInline", | ||
"gutterBottom": "MuiTypography-gutterBottom", | ||
"h1": "MuiTypography-h1", | ||
"h2": "MuiTypography-h2", | ||
"h3": "MuiTypography-h3", | ||
"h4": "MuiTypography-h4", | ||
"h5": "MuiTypography-h5", | ||
"h6": "MuiTypography-h6", | ||
"noWrap": "MuiTypography-noWrap", | ||
"overline": "MuiTypography-overline", | ||
"paragraph": "MuiTypography-paragraph", | ||
"root": "MuiTypography-root", | ||
"srOnly": "MuiTypography-srOnly", | ||
"subtitle1": "MuiTypography-subtitle1", | ||
"subtitle2": "MuiTypography-subtitle2", | ||
} | ||
} | ||
<WithStyles(ForwardRef(Typography)) | ||
className="css-48zeoi emotion-0" | ||
variant="subtitle1" | ||
> | ||
<h6 | ||
className="MuiTypography-root css-18tsvng emotion-0 MuiTypography-subtitle1" | ||
<ForwardRef(Typography) | ||
className="css-48zeoi emotion-0" | ||
classes={ | ||
Object { | ||
"alignCenter": "MuiTypography-alignCenter", | ||
"alignJustify": "MuiTypography-alignJustify", | ||
"alignLeft": "MuiTypography-alignLeft", | ||
"alignRight": "MuiTypography-alignRight", | ||
"body1": "MuiTypography-body1", | ||
"body2": "MuiTypography-body2", | ||
"button": "MuiTypography-button", | ||
"caption": "MuiTypography-caption", | ||
"colorError": "MuiTypography-colorError", | ||
"colorInherit": "MuiTypography-colorInherit", | ||
"colorPrimary": "MuiTypography-colorPrimary", | ||
"colorSecondary": "MuiTypography-colorSecondary", | ||
"colorTextPrimary": "MuiTypography-colorTextPrimary", | ||
"colorTextSecondary": "MuiTypography-colorTextSecondary", | ||
"displayBlock": "MuiTypography-displayBlock", | ||
"displayInline": "MuiTypography-displayInline", | ||
"gutterBottom": "MuiTypography-gutterBottom", | ||
"h1": "MuiTypography-h1", | ||
"h2": "MuiTypography-h2", | ||
"h3": "MuiTypography-h3", | ||
"h4": "MuiTypography-h4", | ||
"h5": "MuiTypography-h5", | ||
"h6": "MuiTypography-h6", | ||
"noWrap": "MuiTypography-noWrap", | ||
"overline": "MuiTypography-overline", | ||
"paragraph": "MuiTypography-paragraph", | ||
"root": "MuiTypography-root", | ||
"srOnly": "MuiTypography-srOnly", | ||
"subtitle1": "MuiTypography-subtitle1", | ||
"subtitle2": "MuiTypography-subtitle2", | ||
} | ||
} | ||
variant="subtitle1" | ||
> | ||
contributors | ||
</h6> | ||
</ForwardRef(Typography)> | ||
</WithStyles(ForwardRef(Typography))> | ||
</Styled(WithStyles(ForwardRef(Typography)))> | ||
<h6 | ||
className="MuiTypography-root css-48zeoi emotion-0 MuiTypography-subtitle1" | ||
> | ||
contributors | ||
</h6> | ||
</ForwardRef(Typography)> | ||
</WithStyles(ForwardRef(Typography))> | ||
</ForwardRef(Text)> | ||
</Styled(Component)> | ||
<Styled(div)> | ||
<div | ||
className="css-mkcn9c emotion-5" | ||
className="css-mkcn9c emotion-6" | ||
> | ||
<Styled(span) | ||
key="[email protected]" | ||
> | ||
<span | ||
className="css-dvxtzn emotion-3" | ||
className="css-dvxtzn emotion-4" | ||
> | ||
<AvatarTooltip | ||
email="[email protected]" | ||
|
@@ -161,7 +166,7 @@ exports[`test Developers should render the component for contributors with items | |
key="[email protected]" | ||
> | ||
<span | ||
className="css-dvxtzn emotion-3" | ||
className="css-dvxtzn emotion-4" | ||
> | ||
<AvatarTooltip | ||
email="[email protected]" | ||
|
@@ -262,68 +267,73 @@ exports[`test Developers should render the component for maintainers with items | |
<Developers | ||
type="maintainers" | ||
> | ||
<Styled(WithStyles(ForwardRef(Typography))) | ||
<Styled(Component) | ||
variant="subtitle1" | ||
> | ||
<WithStyles(ForwardRef(Typography)) | ||
className="css-18tsvng emotion-0" | ||
<ForwardRef(Text) | ||
className="css-48zeoi emotion-0" | ||
variant="subtitle1" | ||
> | ||
<ForwardRef(Typography) | ||
className="css-18tsvng emotion-0" | ||
classes={ | ||
Object { | ||
"alignCenter": "MuiTypography-alignCenter", | ||
"alignJustify": "MuiTypography-alignJustify", | ||
"alignLeft": "MuiTypography-alignLeft", | ||
"alignRight": "MuiTypography-alignRight", | ||
"body1": "MuiTypography-body1", | ||
"body2": "MuiTypography-body2", | ||
"button": "MuiTypography-button", | ||
"caption": "MuiTypography-caption", | ||
"colorError": "MuiTypography-colorError", | ||
"colorInherit": "MuiTypography-colorInherit", | ||
"colorPrimary": "MuiTypography-colorPrimary", | ||
"colorSecondary": "MuiTypography-colorSecondary", | ||
"colorTextPrimary": "MuiTypography-colorTextPrimary", | ||
"colorTextSecondary": "MuiTypography-colorTextSecondary", | ||
"displayBlock": "MuiTypography-displayBlock", | ||
"displayInline": "MuiTypography-displayInline", | ||
"gutterBottom": "MuiTypography-gutterBottom", | ||
"h1": "MuiTypography-h1", | ||
"h2": "MuiTypography-h2", | ||
"h3": "MuiTypography-h3", | ||
"h4": "MuiTypography-h4", | ||
"h5": "MuiTypography-h5", | ||
"h6": "MuiTypography-h6", | ||
"noWrap": "MuiTypography-noWrap", | ||
"overline": "MuiTypography-overline", | ||
"paragraph": "MuiTypography-paragraph", | ||
"root": "MuiTypography-root", | ||
"srOnly": "MuiTypography-srOnly", | ||
"subtitle1": "MuiTypography-subtitle1", | ||
"subtitle2": "MuiTypography-subtitle2", | ||
} | ||
} | ||
<WithStyles(ForwardRef(Typography)) | ||
className="css-48zeoi emotion-0" | ||
variant="subtitle1" | ||
> | ||
<h6 | ||
className="MuiTypography-root css-18tsvng emotion-0 MuiTypography-subtitle1" | ||
<ForwardRef(Typography) | ||
className="css-48zeoi emotion-0" | ||
classes={ | ||
Object { | ||
"alignCenter": "MuiTypography-alignCenter", | ||
"alignJustify": "MuiTypography-alignJustify", | ||
"alignLeft": "MuiTypography-alignLeft", | ||
"alignRight": "MuiTypography-alignRight", | ||
"body1": "MuiTypography-body1", | ||
"body2": "MuiTypography-body2", | ||
"button": "MuiTypography-button", | ||
"caption": "MuiTypography-caption", | ||
"colorError": "MuiTypography-colorError", | ||
"colorInherit": "MuiTypography-colorInherit", | ||
"colorPrimary": "MuiTypography-colorPrimary", | ||
"colorSecondary": "MuiTypography-colorSecondary", | ||
"colorTextPrimary": "MuiTypography-colorTextPrimary", | ||
"colorTextSecondary": "MuiTypography-colorTextSecondary", | ||
"displayBlock": "MuiTypography-displayBlock", | ||
"displayInline": "MuiTypography-displayInline", | ||
"gutterBottom": "MuiTypography-gutterBottom", | ||
"h1": "MuiTypography-h1", | ||
"h2": "MuiTypography-h2", | ||
"h3": "MuiTypography-h3", | ||
"h4": "MuiTypography-h4", | ||
"h5": "MuiTypography-h5", | ||
"h6": "MuiTypography-h6", | ||
"noWrap": "MuiTypography-noWrap", | ||
"overline": "MuiTypography-overline", | ||
"paragraph": "MuiTypography-paragraph", | ||
"root": "MuiTypography-root", | ||
"srOnly": "MuiTypography-srOnly", | ||
"subtitle1": "MuiTypography-subtitle1", | ||
"subtitle2": "MuiTypography-subtitle2", | ||
} | ||
} | ||
variant="subtitle1" | ||
> | ||
maintainers | ||
</h6> | ||
</ForwardRef(Typography)> | ||
</WithStyles(ForwardRef(Typography))> | ||
</Styled(WithStyles(ForwardRef(Typography)))> | ||
<h6 | ||
className="MuiTypography-root css-48zeoi emotion-0 MuiTypography-subtitle1" | ||
> | ||
maintainers | ||
</h6> | ||
</ForwardRef(Typography)> | ||
</WithStyles(ForwardRef(Typography))> | ||
</ForwardRef(Text)> | ||
</Styled(Component)> | ||
<Styled(div)> | ||
<div | ||
className="css-mkcn9c emotion-5" | ||
className="css-mkcn9c emotion-6" | ||
> | ||
<Styled(span) | ||
key="[email protected]" | ||
> | ||
<span | ||
className="css-dvxtzn emotion-3" | ||
className="css-dvxtzn emotion-4" | ||
> | ||
<AvatarTooltip | ||
email="[email protected]" | ||
|
@@ -419,7 +429,7 @@ exports[`test Developers should render the component for maintainers with items | |
key="[email protected]" | ||
> | ||
<span | ||
className="css-dvxtzn emotion-3" | ||
className="css-dvxtzn emotion-4" | ||
> | ||
<AvatarTooltip | ||
email="[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.