@latte-macchiat-io/latte-vanilla-components 0.0.302 → 0.0.303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -6,10 +6,11 @@ import { Icon } from '../Icon';
|
|
6
6
|
import icons from '../Icon/path';
|
7
7
|
|
8
8
|
export type NavSocialProps = React.HTMLAttributes<HTMLDivElement> & {
|
9
|
+
size: number;
|
9
10
|
navSocial: { name: Social; link: string }[];
|
10
11
|
};
|
11
12
|
|
12
|
-
export const NavSocial = ({ navSocial, className }: NavSocialProps) => (
|
13
|
+
export const NavSocial = ({ size = 24, navSocial, className }: NavSocialProps) => (
|
13
14
|
<div className={clsx(navSocialRecipe(), className)}>
|
14
15
|
{navSocial?.map(({ name, link }, index) => {
|
15
16
|
const capitalized = name[0].toUpperCase() + name.slice(1);
|
@@ -17,7 +18,7 @@ export const NavSocial = ({ navSocial, className }: NavSocialProps) => (
|
|
17
18
|
return (
|
18
19
|
<div key={`navSocialItem-${index}`} className={navSocialLink}>
|
19
20
|
<a target="_blank" rel="noopener noreferrer" aria-label={name} href={link}>
|
20
|
-
<Icon icon={`social${capitalized}` as keyof typeof icons} />
|
21
|
+
<Icon size={size} icon={`social${capitalized}` as keyof typeof icons} />
|
21
22
|
</a>
|
22
23
|
</div>
|
23
24
|
);
|