mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
29
scm-ui/ui-components/src/Help.tsx
Normal file
29
scm-ui/ui-components/src/Help.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import styled from 'styled-components';
|
||||
import Tooltip from './Tooltip';
|
||||
import HelpIcon from './HelpIcon';
|
||||
|
||||
type Props = {
|
||||
message: string;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
const HelpTooltip = styled(Tooltip)`
|
||||
position: absolute;
|
||||
padding-left: 3px;
|
||||
`;
|
||||
|
||||
export default class Help extends React.Component<Props> {
|
||||
render() {
|
||||
const { message, className } = this.props;
|
||||
return (
|
||||
<HelpTooltip
|
||||
className={classNames('is-inline-block', className)}
|
||||
message={message}
|
||||
>
|
||||
<HelpIcon />
|
||||
</HelpTooltip>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user