@@ -2,7 +2,8 @@ import React, { Fragment, useState, useEffect } from 'react';
22import { PropTypes } from 'prop-types' ;
33import { Dialog , Transition } from '@headlessui/react' ;
44import Button from 'components/atoms/common/Button' ;
5- import { BUTTON_TYPES } from 'constants/Common' ;
5+ import { BUTTON_INTENT_TYPES , BUTTON_TYPES } from 'constants/Common' ;
6+ import TextInput from 'components/atoms/common/TextInput' ;
67
78const EditEnvVariableModal = ( { closeFn = ( ) => null , open = false , editKey, editValue, handleAddVariable } ) => {
89 const [ value , setValue ] = useState ( editValue ) ;
@@ -37,31 +38,34 @@ const EditEnvVariableModal = ({ closeFn = () => null, open = false, editKey, edi
3738 leaveFrom = 'opacity-100 scale-100'
3839 leaveTo = 'opacity-0 scale-95'
3940 >
40- < Dialog . Panel className = 'w-full max-w-md p-6 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-2xl' >
41- < Dialog . Title
42- as = 'h3'
43- className = 'pb-4 text-lg font-semibold text-center text-gray-900 border-b border-neutral-300'
44- >
41+ < Dialog . Panel className = 'w-full max-w-md p-6 overflow-hidden text-left align-middle transition-all transform bg-white rounded shadow-xl' >
42+ < Dialog . Title as = 'h3' className = 'pb-4 text-lg font-semibold text-center border-b border-gray-300' >
4543 Edit Variable
4644 </ Dialog . Title >
4745 < div className = 'mt-6' >
4846 < div className = 'mt-4' > { editKey } </ div >
4947 < div className = 'mt-4' >
50- < input
48+ < TextInput
5149 id = 'value'
52- className = 'block w-full rounded border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 outline-blue-300 focus:border-blue-100 focus:ring-blue-100'
53- placeholder = 'Value'
50+ placeHolder = { `Value` }
51+ onChangeHandler = { ( event ) => setValue ( event . target . value ) }
52+ name = { 'Value' }
5453 value = { value }
55- onChange = { ( event ) => setValue ( event . target . value ) }
5654 />
5755 </ div >
5856 </ div >
5957 < div className = 'flex items-center gap-2 mt-6' >
60- < Button btnType = { BUTTON_TYPES . error } isDisabled = { false } onClickHandle = { closeFn } fullWidth = { true } >
58+ < Button
59+ btnType = { BUTTON_TYPES . secondary }
60+ intentType = { BUTTON_INTENT_TYPES . error }
61+ isDisabled = { false }
62+ onClickHandle = { closeFn }
63+ fullWidth = { true }
64+ >
6165 Cancel
6266 </ Button >
6367 < Button
64- btnType = { BUTTON_TYPES . info }
68+ btnType = { BUTTON_TYPES . secondary }
6569 isDisabled = { false }
6670 fullWidth = { true }
6771 onClickHandle = { ( ) => {
0 commit comments