2.4.12 • Published 3 years ago
pijma v2.4.12
Велосипед над react-native
Равноправие
react-native
<View
style={{
flex: 1,
alignItems: 'center',
justifyContent: 'center',
width: 200,
height: 100,
padding: 20,
}}
/>
pijma
<View
flex={1}
alignItems="center"
justifyContent="center"
width={200}
height={100}
padding={20}
>
Адаптация
react-native
import React from 'react'
import { Provider, Theme } from 'pijma'
const Box = () => (
<View
style={view}
/>
)
const styles = StyleSheet.create({
view: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
width: 200,
height: 100,
padding: 20,
},
})
const stylesLarge = StyleSheet.create({
view: {
width: 400,
height: 200,
},
})
let view = styles.view
if (Dimensions.get('window').width > 400) {
view = StyleSheet.compose(stylesLarge.view)
}
pijma
import React from 'react'
import { Provider, Theme } from 'pijma'
const Box = () => (
<View
flex={1}
alignItems="center"
justifyContent="center"
width={[200, 400]}
height={[100, 200]}
padding={20}
/>
)
const theme: Theme = {
breakpoints: [600, 1240],
}
const App = () => (
<Provider theme={theme}>
<Box />
</Provider>
)
2.3.0
3 years ago
2.1.2
3 years ago
2.2.0
3 years ago
2.1.1
3 years ago
2.4.1
3 years ago
2.1.4
3 years ago
2.4.0
3 years ago
2.1.3
3 years ago
2.4.3
3 years ago
2.1.6
3 years ago
2.4.2
3 years ago
2.1.5
3 years ago
2.4.5
3 years ago
2.1.8
3 years ago
2.4.4
3 years ago
2.1.7
3 years ago
2.4.10
3 years ago
2.4.12
3 years ago
2.4.11
3 years ago
2.1.0
3 years ago
2.4.7
3 years ago
2.4.6
3 years ago
2.4.9
3 years ago
2.4.8
3 years ago
1.0.0
4 years ago
1.0.1
7 years ago