Skip to content

Commit 35eac8b

Browse files
committed
Rename TagOrStyledElement -> TagNameOrStyledElement
1 parent caec53a commit 35eac8b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
StyledType,
1111
StyledElementAttrsType,
1212
StyledElementType,
13-
TagOrStyledElementType,
13+
TagNameOrStyledElementType,
1414
StyledElementPropsType
1515
} from './types'
1616

@@ -41,12 +41,12 @@ const createStyled = (
4141
}
4242

4343
const styled = (
44-
tagOrStyledElement: TagOrStyledElementType,
44+
tagNameOrStyledElement: TagNameOrStyledElementType,
4545
ownStyle: ComponentStyleType
4646
): StyledElementType => {
47-
const {tagName, style}: StyledElementAttrsType = typeof tagOrStyledElement === 'string'
48-
? {tagName: tagOrStyledElement, style: {}}
49-
: tagOrStyledElement
47+
const {tagName, style}: StyledElementAttrsType = typeof tagNameOrStyledElement === 'string'
48+
? {tagName: tagNameOrStyledElement, style: {}}
49+
: tagNameOrStyledElement
5050

5151
const elementStyle = {...style, ...ownStyle}
5252
const dynamicStyle = getDynamicStyles(elementStyle)

src/types/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type StyledType = Function & {
1616
}
1717
export type StyledElementAttrsType = {tagName: string, style: ComponentStyleType}
1818
export type StyledElementType = Function & StyledElementAttrsType
19-
export type TagOrStyledElementType = string | StyledElementType
19+
export type TagNameOrStyledElementType = string | StyledElementType
2020
export type StyledElementPropsType = {
2121
classes: Object,
2222
children: ?any,

0 commit comments

Comments
 (0)