PolicyEditorFooter.tsx 745 B

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