Commit 5b56e05c authored by Muhammadali's avatar Muhammadali

update verison: 0.9.7

parent 891b2efc
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.9.6", "version": "0.9.7",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -4,10 +4,12 @@ import React, { useState } from 'react'; ...@@ -4,10 +4,12 @@ import React, { useState } from 'react';
import DropDownStyle from './style'; import DropDownStyle from './style';
const DropDown = ({ reasons, reason, selectFunc }) => { const DropDown = ({ reasons, reason, selectFunc }) => {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(0);
return ( return (
<DropDownStyle onClick={() => setVisible(!visible)} className='nocopy'> <DropDownStyle
onClick={() => setVisible(visible == 0 ? 0 : 1)}
className='nocopy'>
<DropDownStyle.Text>{reason}</DropDownStyle.Text> <DropDownStyle.Text>{reason}</DropDownStyle.Text>
<DropDownStyle.DropDown visiblevalue={visible} className={'nocopy'}> <DropDownStyle.DropDown visiblevalue={visible} className={'nocopy'}>
{reasons.map((value, index) => ( {reasons.map((value, index) => (
...@@ -18,7 +20,7 @@ const DropDown = ({ reasons, reason, selectFunc }) => { ...@@ -18,7 +20,7 @@ const DropDown = ({ reasons, reason, selectFunc }) => {
</DropDownStyle.DropDown> </DropDownStyle.DropDown>
<DropDownStyle.Window <DropDownStyle.Window
visiblevalue={visible} visiblevalue={visible}
onClick={() => setVisible(false)} onClick={() => setVisible(0)}
/> />
</DropDownStyle> </DropDownStyle>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment