| | |
| | | return { |
| | | jsonBox: { |
| | | height: '100%', |
| | | border: dark ? '3px solid #747d8c' : '3px solid #535c68', |
| | | border: dark ? '2px solid #747d8c' : '2px solid #535c68', |
| | | borderRadius: '5px', |
| | | padding: '5px', |
| | | cursor: 'text' |
| | |
| | | |
| | | const ShowJSON = (props) => { |
| | | const { styles } = useStyles(); |
| | | const { curSprite } = props; |
| | | const { data } = props; |
| | | |
| | | const formattedJSON = JSON.stringify(curSprite.data, null, 2); |
| | | const formattedJSON = JSON.stringify(data, null, props.jsonType ?? 2); |
| | | |
| | | return ( |
| | | <> |
| | | <div className={styles.jsonBox}> |
| | | <div className={styles.jsonBox} style={{ height: props.height }}> |
| | | <textarea |
| | | readOnly |
| | | className={styles.jsonContent} |