Set the icons to "small" and you will notice that there is a small amount of whitespace in the container of the icon to the right of the icon itself. This is due to the .resp-sharing-button span css selector and it's padding-left. When there is no text, this whitespace causes the icon itself to look askew. I can think of two remedies for this:
It seems like this issue related to this PR: #55
Likely the latter is the better of the two options: you can simply replace
with
or something very similar to that, like pulling all of the logic for text out to another function:
getIconText(name) {
let shareText = null;
switch (this.props.size) {
case 'large':
// GitHub does not like my updates to this line...but I do...
// shareText = `Share ${/^e-?mail$/i.test(this.props.network.name) ? "by" : "on"} ${name}`;
shareText = "Share " + (this.props.network.name.toLowerCase() === "e-mail" ? "by " : "on ") + name;
break;
case 'medium':
if (this.props.network && this.props.network.name) {
shareText = this.props.network.name;
}
break;
default:
}
return shareText;
}
Set the icons to "small" and you will notice that there is a small amount of whitespace in the container of the icon to the right of the icon itself. This is due to the
.resp-sharing-button spancss selector and it's padding-left. When there is no text, this whitespace causes the icon itself to look askew. I can think of two remedies for this:spanIt seems like this issue related to this PR: #55
Likely the latter is the better of the two options: you can simply replace
with
or something very similar to that, like pulling all of the logic for text out to another function: