feat: add setting workspace UI

This commit is contained in:
MingLiang Wang
2022-12-20 12:22:38 +08:00
parent e9ee7efdf5
commit d5832b1093
3 changed files with 208 additions and 4 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
import { InputHTMLAttributes, useState } from 'react';
import { InputHTMLAttributes, useEffect, useState } from 'react';
import { StyledInput } from './style';
type inputProps = {
@@ -29,6 +29,9 @@ export const Input = (props: inputProps) => {
const handleBlur: InputHTMLAttributes<HTMLInputElement>['onBlur'] = e => {
onBlur && onBlur(e);
};
useEffect(() => {
setValue(valueProp || '');
}, [valueProp]);
return (
<StyledInput
value={value}