import React from 'react'
type ButtonState = 'default' | 'loading' | 'success'
interface ButtonProps {
label: string,
loadingLabel?: string,
successLabel?: string,
state?: ButtonState,
onClick?: () => void
}
const LoadingButton = ({loadingLabel}) => (
)
const SuccessButton = ({successLabel}) => (
)
const DefaultButton = ({label, onClick}) => (
)
export const Button:React.FC = ({
label,
loadingLabel = 'Loading...',
successLabel = 'Success!',
state = 'default',
onClick = null
}) => {
switch (state) {
case 'loading':
return
case 'success':
return
default:
return
}
}