mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
20 lines
449 B
JavaScript
20 lines
449 B
JavaScript
import React from 'react';
|
|
import { Tooltip, Icon } from 'antd';
|
|
|
|
const branchUrl = 'https://github.com/ant-design/ant-design/edit/master/';
|
|
|
|
export default function EditButton({ title, filename }) {
|
|
return (
|
|
<Tooltip title={title}>
|
|
<a
|
|
className="edit-button"
|
|
href={`${branchUrl}${filename}`}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
<Icon type="edit" />
|
|
</a>
|
|
</Tooltip>
|
|
);
|
|
}
|