Merge pull request #138 from ONLYOFFICE/bugifx/social-button

bugfix/social-button
This commit is contained in:
Alexey Safronov 2023-12-15 18:43:42 +04:00 committed by GitHub
commit 8846da3412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 14 deletions

View File

@ -17,20 +17,16 @@ class SocialButton extends React.Component {
this.props;
return (
<StyledSocialButton isConnect={isConnect} {...otherProps}>
<div>
{IconComponent ? (
<IconComponent className="iconWrapper" />
) : (
<ReactSVG className="iconWrapper" src={iconName} />
)}
</div>
<div>
{label && (
<Text as="span" className="social_button_text">
{label}
</Text>
)}
</div>
{IconComponent ? (
<IconComponent className="iconWrapper" />
) : (
<ReactSVG className="iconWrapper" src={iconName} />
)}
{label && (
<Text as="div" className="social_button_text">
{label}
</Text>
)}
</StyledSocialButton>
);
}

View File

@ -152,6 +152,15 @@ const StyledSocialButton = styled(ButtonWrapper).attrs((props) => ({
overflow: ${(props) => props.theme.socialButton.text.overflow};
text-overflow: ${(props) => props.theme.socialButton.text.textOverflow};
white-space: ${(props) => props.theme.socialButton.text.whiteSpace};
${(props) =>
props.interfaceDirection === "rtl"
? css`
padding-left: 16px;
`
: css`
padding-right: 16px;
`}
}
svg {