New link component
This commit is contained in:
parent
61d286eecb
commit
b76bb491c0
1 changed files with 16 additions and 0 deletions
16
src/builtin-components/Link/Link.tsx
Normal file
16
src/builtin-components/Link/Link.tsx
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
to: string
|
||||||
|
children?: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export default (props: Props) => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<a href={props.to} aria-label={`Go to ${props.to}`}>
|
||||||
|
{props.children}
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue