You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
591 B

import React from 'react';
import { Tooltip } from 'antd';
import { EditOutlined } from '@ant-design/icons';
const branchUrl = 'https://github.com/ant-design/ant-design/edit/master/';
export interface EditButtonProps {
title: React.ReactNode;
filename?: string;
}
export default function EditButton({ title, filename }: EditButtonProps) {
return (
<Tooltip title={title}>
<a
className="edit-button"
href={`${branchUrl}${filename}`}
target="_blank"
rel="noopener noreferrer"
>
<EditOutlined />
</a>
</Tooltip>
);
}