mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
15 lines
510 B
TypeScript
15 lines
510 B
TypeScript
import * as React from 'react';
|
|
import TextButton, { ButtonType, TextButtonProps } from './TextButton';
|
|
|
|
type Props = Omit<TextButtonProps, 'type'>;
|
|
|
|
const makeTextButtonComponent = (type: ButtonType) => {
|
|
return (props: Props) => {
|
|
return <TextButton {...props} type={type} />;
|
|
};
|
|
};
|
|
|
|
export const PrimaryButton = makeTextButtonComponent(ButtonType.Primary);
|
|
export const SecondaryButton = makeTextButtonComponent(ButtonType.Secondary);
|
|
export const LinkButton = makeTextButtonComponent(ButtonType.Link);
|