mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			387 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			387 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
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}
 | 
						|
    />
 | 
						|
  );
 | 
						|
}
 |