ant-design/site/theme/template/Content/EditButton.jsx

15 lines
410 B
React
Raw Normal View History

import React from 'react';
import { Tooltip, Icon } from 'antd';
const branchUrl = 'https://github.com/ant-design/ant-design/edit/master/';
2016-08-17 18:33:19 +08:00
export default function EditButton({ title, filename }) {
return (
<Tooltip title={title}>
2018-06-08 23:21:25 +08:00
<a className="edit-button" href={`${branchUrl}${filename}`} target="_blank" rel="noopener noreferrer">
2016-08-17 18:33:19 +08:00
<Icon type="edit" />
</a>
</Tooltip>
);
}