remove unused styling

This commit is contained in:
AykutSarac 2022-02-04 16:51:54 +03:00
parent 2c08427e9a
commit e9c9990631

View File

@ -16,10 +16,6 @@ type JsonData = {
const StyledJSONInput = styled(JSONInput)`
margin-top: 10px;
padding: 5px;
[name="outer-box"] > div {
transform: translate(-75%, 25%);
}
`;
export const defaultValue = [
@ -69,17 +65,19 @@ export const JsonEditor: React.FC = () => {
}
}, []);
return (
<StyledJSONInput
placeholder={JSON.parse(json)}
onChange={(value: JsonData) => {
const handleChange = (data: JsonData) => {
try {
JSON.parse(value.json);
setJson(value.json);
JSON.parse(data.json);
setJson(data.json);
} catch (error: any) {
console.error("Invalid JSON!", error.stack);
}
}}
};
return (
<StyledJSONInput
placeholder={JSON.parse(json)}
onChange={handleChange}
locale={locale}
height="100%"
/>