PolicyEditorFooter.tsx29 lines · main
| 1 | import { noop } from 'lodash' |
| 2 | import { Button } from 'ui' |
| 3 | |
| 4 | interface PolicyEditorFooterProps { |
| 5 | showTemplates: boolean |
| 6 | onViewTemplates: () => void |
| 7 | onReviewPolicy: () => void |
| 8 | } |
| 9 | |
| 10 | const PolicyEditorFooter = ({ |
| 11 | showTemplates, |
| 12 | onViewTemplates = noop, |
| 13 | onReviewPolicy = noop, |
| 14 | }: PolicyEditorFooterProps) => ( |
| 15 | <div className="flex justify-between items-center border-t px-6 py-4 border-default"> |
| 16 | <div className="flex w-full items-center justify-end gap-2"> |
| 17 | {showTemplates && ( |
| 18 | <Button type="default" onClick={onViewTemplates}> |
| 19 | View templates |
| 20 | </Button> |
| 21 | )} |
| 22 | <Button type="primary" onClick={onReviewPolicy}> |
| 23 | Review |
| 24 | </Button> |
| 25 | </div> |
| 26 | </div> |
| 27 | ) |
| 28 | |
| 29 | export default PolicyEditorFooter |