New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-jsbox

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jsbox - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

2

package.json
{
"name": "react-jsbox",
"version": "0.0.19",
"version": "0.0.20",
"description": "A Custom React Renderer for writing JSBox apps in React.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -394,63 +394,22 @@ # react-jsbox-renderer

import rootContainer from './Containers/root'
import useMotion from './hooks/useMotion'
const {width, height} = $device.info.screen
// Create React Components:
class App extends React.PureComponent {
constructor(props) {
super(props)
this.state = {
count: 0
}
this._listTemplate = {
props: {
bgcolor: $color('#fff')
},
views: [
{
type: 'label',
props: {
bgcolor: $color('#474b51'),
textColor: $color('#abb2bf'),
align: $align.center,
font: $font('iosevka', 24)
},
layout: $layout.fill
}
]
}
}
const App = () => {
const [state] = useMotion()
render() {
return (
<view frame={styles.container}>
<label
frame={styles.text}
align={$align.center}
font={$font('ArialRoundedMTBold', 26)}
text={String(this.state.count)}
autoFontSize={true}
/>
<list
frame={styles.list}
scrollEnabled={false}
radius={10}
bgcolor={$color('#ededed')}
data={['INCREASE', 'DECREASE', 'RESET']}
template={this._listTemplate}
events={{
didSelect: (sender, {row}, data) =>
this.setState({
count: this.state.count + [1, -1, -this.state.count][row]
})
}}
/>
</view>
)
}
return (
<view frame={styles.container}>
<text
frame={styles.container}
font={$font(12)}
text={JSON.stringify(state, null, 2)}
autoFontSize={true}
/>
</view>
)
}
let styles = {
container: $rect(0, 0, width, height - 40),
text: $rect(0, 64, width, 30),
list: $rect(0, (height - 40) * 0.3, width, 132)
container: $rect(0, 0, width, height - 40)
}

@@ -457,0 +416,0 @@

import View from './Components/View'
import warn from 'warning'
import { filterProps, emptyObject, now, debug } from './helper'

@@ -4,0 +3,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc