Fixed formatting of dropdown button

This commit is contained in:
Henry Whitaker
2020-06-10 12:54:39 +01:00
parent 4904076f1e
commit 81856f5f4b
2 changed files with 10 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Button, Dropdown } from 'react-bootstrap';
import { Button, Dropdown, DropdownButton } from 'react-bootstrap';
import { toast } from 'react-toastify';
import Axios from 'axios';
@@ -29,16 +29,10 @@ export default class Backup extends Component {
render() {
return (
<Dropdown className="m-2">
<Dropdown.Toggle variant="primary" id="backupDropdown">
Backup
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="#" onClick={() => { this.backup('json') }}>JSON</Dropdown.Item>
<Dropdown.Item href="#" onClick={() => { this.backup('csv') }}>CSV</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<DropdownButton title="Backup" variant="primary" className="m-2 d-inline-block">
<Dropdown.Item href="#" onClick={() => { this.backup('json') }}>JSON</Dropdown.Item>
<Dropdown.Item href="#" onClick={() => { this.backup('csv') }}>CSV</Dropdown.Item>
</DropdownButton>
);
}
}