mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Moved render functions into lib/charts.
This commit is contained in:
parent
5a5127c921
commit
3ccdd95f49
6 changed files with 101 additions and 101 deletions
|
|
@ -11,6 +11,7 @@ import {
|
|||
SubmitButton,
|
||||
Text,
|
||||
TextField,
|
||||
Tooltip,
|
||||
} from 'react-basics';
|
||||
import Icons from 'components/icons';
|
||||
import { updateReport } from 'store/reports';
|
||||
|
|
@ -91,28 +92,30 @@ function AddURLButton({ onAdd }) {
|
|||
};
|
||||
|
||||
return (
|
||||
<ModalTrigger>
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Modal>
|
||||
{close => {
|
||||
return (
|
||||
<Form>
|
||||
<FormRow label={formatMessage(labels.url)}>
|
||||
<TextField name="url" value={url} onChange={handleChange} autoComplete="off" />
|
||||
</FormRow>
|
||||
<FormButtons align="center" flex>
|
||||
<Button variant="primary" onClick={() => handleAdd(close)}>
|
||||
{formatMessage(labels.add)}
|
||||
</Button>
|
||||
<Button onClick={() => handleClose(close)}>{formatMessage(labels.cancel)}</Button>
|
||||
</FormButtons>
|
||||
</Form>
|
||||
);
|
||||
}}
|
||||
</Modal>
|
||||
</ModalTrigger>
|
||||
<Tooltip label={formatMessage(labels.addUrl)}>
|
||||
<ModalTrigger>
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Modal>
|
||||
{close => {
|
||||
return (
|
||||
<Form>
|
||||
<FormRow label={formatMessage(labels.url)}>
|
||||
<TextField name="url" value={url} onChange={handleChange} autoComplete="off" />
|
||||
</FormRow>
|
||||
<FormButtons align="center" flex>
|
||||
<Button variant="primary" onClick={() => handleAdd(close)}>
|
||||
{formatMessage(labels.add)}
|
||||
</Button>
|
||||
<Button onClick={() => handleClose(close)}>{formatMessage(labels.cancel)}</Button>
|
||||
</FormButtons>
|
||||
</Form>
|
||||
);
|
||||
}}
|
||||
</Modal>
|
||||
</ModalTrigger>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue