-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added custom tag #15
added custom tag #15
Conversation
src/components/Icons/index.tsx
Outdated
@@ -10,21 +10,25 @@ interface IProps { | |||
color?: string; | |||
size?: string; | |||
classPrefix?: string; | |||
tag?: string; | |||
tag?: 'a'; | |||
url?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icons shouldn't have url and replace
src/components/Icons/index.tsx
Outdated
}: IProps) { | ||
const CustomTag = tag || 'a'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom icon tag should be 'i' by default
src/components/Icons/index.tsx
Outdated
}); | ||
} else { | ||
Object.assign(iconProps, { | ||
target: '_blank' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these don't belong here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I just think maybe one day we need the icon to be an 'a' tag. I will delete these codes.
src/components/Icons/index.tsx
Outdated
@@ -10,21 +10,21 @@ interface IProps { | |||
color?: string; | |||
size?: string; | |||
classPrefix?: string; | |||
tag?: string; | |||
tag?: 'i'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think tag name should be a string here. 'i' is just the default value, not enum
Missing story |
No description provided.