mirror of
https://github.com/SomboChea/ui
synced 2024-04-28 07:31:36 +07:00
17 lines
336 B
JavaScript
17 lines
336 B
JavaScript
/**
|
|
* @prettier
|
|
* @flow
|
|
*/
|
|
|
|
import React from 'react';
|
|
import type { Node } from 'react';
|
|
import { IProps } from './types';
|
|
|
|
const Link = ({ children, to = '#', blank = false, ...props }: IProps): Node => (
|
|
<a href={to} target={blank ? '_blank' : '_self'} {...props}>
|
|
{children}
|
|
</a>
|
|
);
|
|
|
|
export default Link;
|