From 983e85218982ead686f430f602d47943682c4cee Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Tue, 17 Nov 2020 15:17:44 -0500 Subject: [PATCH] Add visual spacing and use small outlined styling --- src/components/QueueSelector/QueueSelector.js | 70 ++++++++++--------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/src/components/QueueSelector/QueueSelector.js b/src/components/QueueSelector/QueueSelector.js index 01a605b..fb0f6bf 100644 --- a/src/components/QueueSelector/QueueSelector.js +++ b/src/components/QueueSelector/QueueSelector.js @@ -1,12 +1,14 @@ import React from "react"; import PropTypes from "prop-types"; -import { TextField, Checkbox, InputAdornment } from "@material-ui/core"; +import { TextField, Checkbox, InputAdornment, Box, useTheme } from "@material-ui/core"; import { Autocomplete } from "@material-ui/lab"; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; export default function QueueSelector({ queues, selectedQueues, setSelectedQueues }) { + const theme = useTheme(); + const handleChange = (event, newValue) => { setSelectedQueues(newValue) }; @@ -24,38 +26,42 @@ export default function QueueSelector({ queues, selectedQueues, setSelectedQueue ); return( - ( - - - Active Queues: - - {params.InputProps.startAdornment} - - ), - }} - /> - )} + + ( + + + Active Queues: + + {params.InputProps.startAdornment} + + ), + }} + /> + )} - options={queues} - onChange={handleChange} - getOptionLabel={(option) => `${option.name} (${option.number_of_items})`} - renderOption={optionRenderer} - getOptionSelected={ (option, value) => option.name === value.name } - disableCloseOnSelect - disableListWrap - fullWidth - multiple - /> + options={queues} + onChange={handleChange} + getOptionLabel={(option) => `${option.name} (${option.number_of_items})`} + renderOption={optionRenderer} + getOptionSelected={ (option, value) => option.name === value.name } + disableCloseOnSelect + disableListWrap + fullWidth + multiple + size="small" + /> + ); };