2.4.12 • Published 4 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
4 years ago
2.1.2
4 years ago
2.2.0
4 years ago
2.1.1
4 years ago
2.4.1
4 years ago
2.1.4
4 years ago
2.4.0
4 years ago
2.1.3
4 years ago
2.4.3
4 years ago
2.1.6
4 years ago
2.4.2
4 years ago
2.1.5
4 years ago
2.4.5
4 years ago
2.1.8
4 years ago
2.4.4
4 years ago
2.1.7
4 years ago
2.4.10
4 years ago
2.4.12
4 years ago
2.4.11
4 years ago
2.1.0
4 years ago
2.4.7
4 years ago
2.4.6
4 years ago
2.4.9
4 years ago
2.4.8
4 years ago
1.0.0
5 years ago
1.0.1
7 years ago