Skip to content

Commit

Permalink
Merge pull request #107 from bluewave-labs/93-implement-dropdownlist-…
Browse files Browse the repository at this point in the history
…component

Issue 93: Implement dropdownlist component
  • Loading branch information
rusisolanki authored Jul 22, 2024
2 parents ae6667b + e1de07e commit 307f0a3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions frontend/src/components/DropdownList/DropdownList.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.dropdown{
display: flex;
align-items: center;
justify-content: center;

}
.select{
width: 241px;
height: 34px;
font-size: 13px !important;
}
.menuItem{
font-size: 13px !important;
}
26 changes: 26 additions & 0 deletions frontend/src/components/DropdownList/DropdownList.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import MenuItem from '@mui/material/MenuItem';
import Select from '@mui/material/Select';
import React from 'react'
import PropTypes from 'prop-types'
import './DropdownList.css'

const DropdownList = ({actions = []}) => {
return (
<div className='dropdown'>
<Select
defaultValue={actions[0]}
className='select'
>
{actions.map((action, index) => (
<MenuItem key={index} className='menuItem' value={action}>{action}</MenuItem>
))}
</Select>
</div>
)
}

DropdownList.propTypes = {
actions: PropTypes.array
}

export default DropdownList

0 comments on commit 307f0a3

Please sign in to comment.