
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
react-native-quick-layout
Advanced tools
In this examle,I have a lot of textinput and have to exposure properties of member.So why not create TLayout component independently?
In TLayout,We hava a lot different T to Show.
In ILayout,the layout is divided into the upper and lower layout and the left and right layout
npm i react-native-quick-layout --save
or use yarn
yarn add react-native-quick-layout
using ES6 modules and destructuring..
import {
ILayout,
TLayout,
} from 'react-native-quick-layout';
const tstyle = StyleSheet.create({
TContainer: {
flex: 0.5,
backgroundColor: 'yellow',
width: 300,
},
mid: { backgroundColor: 'gray', flex: 1 },
sub1: {
backgroundColor: 'red',
flex: 1,
},
sub2: {
backgroundColor: 'yellow',
flex: 1,
},
sub3: {
backgroundColor: 'green',
flex: 1,
},
text: {
color: 'white',
fontSize: 18
},
});
const tLayout = (
<TLayout
position={TLayout.Position.bottom}
containerStyle={tstyle.TContainer}
renderSub1={<View><Text>11111</Text></View>}
renderSub2={<View><Text>22222</Text></View>}
renderSub3={<View><Text>33333</Text></View>}
sub1Style={tstyle.sub1}
sub2Style={tstyle.sub2}
sub1And2ContainerStyle={tstyle.mid}
sud3ContainerStyle={tstyle.sub3}
/>
);
const istyle = StyleSheet.create({
IContainer: {
flex: 0.5,
backgroundColor: 'yellow',
width: 300,
},
sub1: {
backgroundColor: 'red',
flex: 1,
},
sub2: {
backgroundColor: 'green',
flex: 1,
},
text: {
color: 'white',
fontSize: 18
},
});
const iLayout = (
<ILayout
isLay={false}
containerStyle={istyle.IContainer}
sub1Style={istyle.sub1}
sub2Style={istyle.sub2}
renderSub1={<Text style={istyle.text}>试试改变"isLay"的值</Text>}
renderSub2={<Text style={istyle.text}>我是renderSub2中的内容</Text>}
/>
)
MIT
FAQs
Reusable layout,Similar to the T and I layout.
The npm package react-native-quick-layout receives a total of 1 weekly downloads. As such, react-native-quick-layout popularity was classified as not popular.
We found that react-native-quick-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.