git ssb

0+

Rômulo Alves / website



Tree: 7a06852ff59f91404bd07a90d8bdf896f5a42c59

Files: 7a06852ff59f91404bd07a90d8bdf896f5a42c59 / _components / common / Anchor.js

639 bytesRaw
1// Packages
2import React from 'react';
3import css from 'next/css';
4
5const generateClassNames = (styleOne, styleTwo) => {
6 if (styleTwo !== null && styleTwo !== undefined) {
7 return `${styleOne} ${styleTwo}`;
8 }
9 return styleOne;
10};
11
12export default ({href, title, children, color, hoverColor, fontSize, className}) => {
13 const style = css({
14 color: color || '#000',
15 fontSize: fontSize || '10pt',
16 ':hover': {
17 color: hoverColor || '#81D4FA'
18 }
19 });
20 const classNames = generateClassNames(style, className);
21 return (
22 <a href={href} title={title} className={classNames} target="_blank">{children}</a>
23 );
24};
25

Built with git-ssb-web