mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
add help icon and mockup for usage
This commit is contained in:
32
scm-ui-components/packages/ui-components/src/Help.js
Normal file
32
scm-ui-components/packages/ui-components/src/Help.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
//@flow
|
||||||
|
import React from "react";
|
||||||
|
import injectSheet from "react-jss";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
const styles = {
|
||||||
|
img: {
|
||||||
|
display: "block"
|
||||||
|
},
|
||||||
|
q: {
|
||||||
|
float: "left"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
message?: string,
|
||||||
|
classes: any
|
||||||
|
};
|
||||||
|
|
||||||
|
class Help extends React.Component<Props> {
|
||||||
|
render() {
|
||||||
|
const { message, classes } = this.props;
|
||||||
|
return (
|
||||||
|
<div className={classNames("tooltip", classes.q)}
|
||||||
|
data-tooltip={message}>
|
||||||
|
<i className={classNames("fa fa-question has-text-info", classes.img)}></i>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default injectSheet(styles)(Help);
|
||||||
@@ -16,6 +16,8 @@ export { default as MailLink } from "./MailLink.js";
|
|||||||
export { default as Notification } from "./Notification.js";
|
export { default as Notification } from "./Notification.js";
|
||||||
export { default as Paginator } from "./Paginator.js";
|
export { default as Paginator } from "./Paginator.js";
|
||||||
export { default as ProtectedRoute } from "./ProtectedRoute.js";
|
export { default as ProtectedRoute } from "./ProtectedRoute.js";
|
||||||
|
export { default as Help } from "./Help.js";
|
||||||
|
|
||||||
|
|
||||||
export { apiClient, NOT_FOUND_ERROR, UNAUTHORIZED_ERROR } from "./apiclient.js";
|
export { apiClient, NOT_FOUND_ERROR, UNAUTHORIZED_ERROR } from "./apiclient.js";
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ import React from "react";
|
|||||||
import { translate } from "react-i18next";
|
import { translate } from "react-i18next";
|
||||||
import { Route } from "react-router";
|
import { Route } from "react-router";
|
||||||
|
|
||||||
import { Page, Navigation, NavLink, Section } from "@scm-manager/ui-components";
|
import {
|
||||||
|
Page,
|
||||||
|
Navigation,
|
||||||
|
NavLink,
|
||||||
|
Section,
|
||||||
|
Help
|
||||||
|
} from "@scm-manager/ui-components";
|
||||||
import GlobalConfig from "./GlobalConfig";
|
import GlobalConfig from "./GlobalConfig";
|
||||||
import type { History } from "history";
|
import type { History } from "history";
|
||||||
|
|
||||||
@@ -33,6 +39,7 @@ class Config extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
<Help message={"Hallo"} />
|
||||||
<div className="columns">
|
<div className="columns">
|
||||||
<div className="column is-three-quarters">
|
<div className="column is-three-quarters">
|
||||||
<Route path={url} exact component={GlobalConfig} />
|
<Route path={url} exact component={GlobalConfig} />
|
||||||
|
|||||||
Reference in New Issue
Block a user