GoBack.tsx 448 B

1234567891011121314151617181920
  1. import { Button, Space } from "antd";
  2. import { Link } from "react-router";
  3. import { ArrowLeftOutlined } from "@ant-design/icons";
  4. interface IWidgetGoBack {
  5. to: string;
  6. title?: string;
  7. }
  8. const GoBackWidget = (prop: IWidgetGoBack) => {
  9. return (
  10. <Space>
  11. <Link to={prop.to}>
  12. <Button shape="circle" icon={<ArrowLeftOutlined />} />
  13. </Link>
  14. <span>{prop.title}</span>
  15. </Space>
  16. );
  17. };
  18. export default GoBackWidget;