Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dist/cspr-design.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -39800,8 +39800,9 @@ const Bv = be.div.withConfig({
})), WS = St.forwardRef(({
socialMediaType: e,
userId: o,
...g
}, C) => /* @__PURE__ */ $(zv, { ref: C, color: "inherit", socialMediaType: e, href: Uv(e, o), ...g, "aria-label": `Go to ${e}`, children: /* @__PURE__ */ $(_t, { src: Vv[e], alt: e }) })), Fv = be.div.withConfig({
rel: g,
...C
}, P) => /* @__PURE__ */ $(zv, { ref: P, color: "inherit", socialMediaType: e, href: Uv(e, o), ...C, rel: g ?? "noopener", "aria-label": `Go to ${e}`, children: /* @__PURE__ */ $(_t, { src: Vv[e], alt: e }) })), Fv = be.div.withConfig({
displayName: "tab-menu-container__StyledWrapper",
componentId: "sc-9x52i1-0"
})(({
Expand Down
2 changes: 1 addition & 1 deletion dist/cspr-design.umd.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions dist/lib/components/svg-icon/svg-icon-social.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { default as React } from 'react';
import { BaseProps } from '../../types';
export type SocialMediaType = 'keybase' | 'telegram' | 'twitter' | 'twitter_x' | 'github' | 'youtube' | 'facebook' | 'medium' | 'reddit' | 'wechat' | 'linkedin' | 'website';
export interface SvgIconSocialProps extends BaseProps {
export type SvgIconSocialProps = BaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseProps | 'href' | 'color'> & {
socialMediaType: SocialMediaType;
userId: string;
}
export declare const SvgIconSocial: React.ForwardRefExoticComponent<SvgIconSocialProps & React.RefAttributes<HTMLAnchorElement>>;
};
export declare const SvgIconSocial: React.ForwardRefExoticComponent<BaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "href" | keyof BaseProps> & {
socialMediaType: SocialMediaType;
userId: string;
} & React.RefAttributes<HTMLAnchorElement>>;
export default SvgIconSocial;
//# sourceMappingURL=svg-icon-social.d.ts.map
2 changes: 1 addition & 1 deletion dist/lib/components/svg-icon/svg-icon-social.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 28 additions & 19 deletions src/lib/components/svg-icon/svg-icon-social.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ export type SocialMediaType =
| 'linkedin'
| 'website';

/* eslint-disable-next-line */
export interface SvgIconSocialProps extends BaseProps {
socialMediaType: SocialMediaType;
userId: string;
}
export type SvgIconSocialProps = BaseProps &
Omit<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
keyof BaseProps | 'href' | 'color'
> & {
socialMediaType: SocialMediaType;
userId: string;
};

const Container = styled(Link)<Omit<SvgIconSocialProps, 'userId'>>(
({ theme, socialMediaType: type }) => ({
Expand All @@ -111,19 +114,25 @@ const Container = styled(Link)<Omit<SvgIconSocialProps, 'userId'>>(
export const SvgIconSocial = React.forwardRef<
HTMLAnchorElement,
SvgIconSocialProps
>(({ socialMediaType: type, userId, ...props }: SvgIconSocialProps, ref) => {
return (
<Container
ref={ref}
color="inherit"
socialMediaType={type}
href={getSocialMediaUrl(type, userId)}
{...props}
aria-label={`Go to ${type}`}
>
<SvgIcon src={getMediaLogo[type]} alt={type} />
</Container>
);
});
>(
(
{ socialMediaType: type, userId, rel, ...props }: SvgIconSocialProps,
ref,
) => {
return (
<Container
ref={ref}
color="inherit"
socialMediaType={type}
href={getSocialMediaUrl(type, userId)}
{...props}
rel={rel ?? 'noopener'}
aria-label={`Go to ${type}`}
>
<SvgIcon src={getMediaLogo[type]} alt={type} />
</Container>
);
},
);

export default SvgIconSocial;
Loading