Created
October 23, 2019 15:42
-
-
Save JoshK2/243485cca7c0f16256a5ab7c13f03e1e to your computer and use it in GitHub Desktop.
simple Link component - build react typescript component in isolation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, CSSProperties } from 'react'; | |
type LinkProps = { | |
link: string | |
} | |
const css: CSSProperties = { | |
fontSize: 16, | |
color: '#000000', | |
} | |
export default class Link extends Component<LinkProps, {}> { | |
render() { | |
const { link, children } = this.props; | |
return <a href={link} style={css}>{children}</a> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment