mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
remove unused styling
This commit is contained in:
parent
2c08427e9a
commit
e9c9990631
@ -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%"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user