Add one tooltip.

This commit is contained in:
Yang Luo
2021-06-25 00:13:43 +08:00
parent 8b8eeea73d
commit 234a9b9060
4 changed files with 16 additions and 2 deletions

View File

@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import {message} from "antd";
import {message, Tooltip} from "antd";
import {QuestionCircleTwoTone} from "@ant-design/icons";
import React from "react";
import {isMobile as isMobileDevice} from "react-device-detect";
import "./i18n";
@ -408,3 +409,14 @@ export function renderHelmet(application) {
</Helmet>
)
}
export function getLabel(text, tooltip) {
return (
<React.Fragment>
<span style={{ marginRight: 4 }}>{text}</span>
<Tooltip placement="top" title={tooltip}>
<QuestionCircleTwoTone twoToneColor="rgb(45,120,213)" />
</Tooltip>
</React.Fragment>
);
}