feat: journal number setting dialog.

This commit is contained in:
Ahmed Bouhuolia
2020-10-21 01:01:06 +02:00
parent c14116a0fd
commit fb1ecd529f
22 changed files with 304 additions and 150 deletions

View File

@@ -0,0 +1,27 @@
import React, { useMemo } from 'react';
import classNames from 'classnames';
import { Button, Tooltip, Classes } from '@blueprintjs/core';
export default function InputPrependButton({
buttonProps = {},
tooltip = false,
tooltipProps = {},
}) {
const appendButton = useMemo(() => (
<Button
className={classNames('input-prepend__button', Classes.SMALL)}
{...buttonProps}
/>
), [buttonProps]);
const appendButtonWithTooltip = useMemo(
() => (<Tooltip {...tooltipProps}>{ appendButton }</Tooltip>),
[tooltipProps, appendButton],
);
return (
<div class="input-prepend">
{ tooltip ? appendButtonWithTooltip : appendButton }
</div>
);
}