mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Create app namespace for all absolute requires of app modules. Move all packages under packages yarn workspace
This commit is contained in:
18
packages/app/components/ui/form/LinkButton.tsx
Normal file
18
packages/app/components/ui/form/LinkButton.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import Button from './Button';
|
||||
|
||||
export default function LinkButton(
|
||||
props: React.ComponentProps<typeof Button> &
|
||||
React.ComponentProps<typeof Link>,
|
||||
) {
|
||||
const { to, ...restProps } = props;
|
||||
|
||||
return (
|
||||
<Button
|
||||
component={linkProps => <Link {...linkProps} to={to} />}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user