|
1 | 1 | import React from 'react'; |
2 | | -import { Flex, H3, P, Button, ButtonProps, classNames, Hr } from '@tpr/core'; |
| 2 | +import { Flex, H3, P, classNames, Hr } from '@tpr/core'; |
3 | 3 | import styles from './card.module.scss'; |
4 | 4 |
|
5 | 5 | type StyledCardProps = { complete: boolean }; |
@@ -53,40 +53,40 @@ export const Toolbar: React.FC<ToolbarProps> = ({ |
53 | 53 | ); |
54 | 54 | }; |
55 | 55 |
|
56 | | -type FooterButtonProps = { |
57 | | - type?: 'button' | 'submit'; |
58 | | - title?: string | Function; |
59 | | - appearance?: 'primary' | 'outlined'; |
60 | | - intent?: 'none' | 'success' | 'warning' | 'danger'; |
61 | | - loadingMessage?: string; |
62 | | - onClick?: (...args: any[]) => void; |
63 | | - disabled?: boolean; |
64 | | - cfg?: ButtonProps['cfg']; |
65 | | -}; |
66 | | -export const FooterButton: React.FC<FooterButtonProps> = ({ |
67 | | - intent, |
68 | | - appearance, |
69 | | - type, |
70 | | - onClick, |
71 | | - disabled, |
72 | | - loadingMessage = 'Saving...', |
73 | | - title, |
74 | | - cfg, |
75 | | -}) => { |
76 | | - const t = typeof title === 'function' ? title() : title; |
77 | | - return ( |
78 | | - <Button |
79 | | - intent={intent} |
80 | | - appearance={appearance} |
81 | | - type={type} |
82 | | - onClick={onClick} |
83 | | - disabled={disabled} |
84 | | - cfg={cfg} |
85 | | - > |
86 | | - {disabled ? loadingMessage : t} |
87 | | - </Button> |
88 | | - ); |
89 | | -}; |
| 56 | +// type FooterButtonProps = { |
| 57 | +// type?: 'button' | 'submit'; |
| 58 | +// title?: string | Function; |
| 59 | +// appearance?: 'primary' | 'outlined'; |
| 60 | +// intent?: 'none' | 'success' | 'warning' | 'danger'; |
| 61 | +// loadingMessage?: string; |
| 62 | +// onClick?: (...args: any[]) => void; |
| 63 | +// disabled?: boolean; |
| 64 | +// cfg?: ButtonProps['cfg']; |
| 65 | +// }; |
| 66 | +// export const FooterButton: React.FC<FooterButtonProps> = ({ |
| 67 | +// intent, |
| 68 | +// appearance, |
| 69 | +// type, |
| 70 | +// onClick, |
| 71 | +// disabled, |
| 72 | +// loadingMessage = 'Saving...', |
| 73 | +// title, |
| 74 | +// cfg, |
| 75 | +// }) => { |
| 76 | +// const t = typeof title === 'function' ? title() : title; |
| 77 | +// return ( |
| 78 | +// <Button |
| 79 | +// intent={intent} |
| 80 | +// appearance={appearance} |
| 81 | +// type={type} |
| 82 | +// onClick={onClick} |
| 83 | +// disabled={disabled} |
| 84 | +// cfg={cfg} |
| 85 | +// > |
| 86 | +// {disabled ? loadingMessage : t} |
| 87 | +// </Button> |
| 88 | +// ); |
| 89 | +// }; |
90 | 90 |
|
91 | 91 | export const Footer: React.FC = ({ children }) => { |
92 | 92 | return ( |
|
0 commit comments