git ssb

0+

Rômulo Alves / website



Tree: d1965e6223c3a0dba5efd21a77f674689c9f1389

Files: d1965e6223c3a0dba5efd21a77f674689c9f1389 / _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