This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
snack-embed.html
52 lines (37 loc) · 6.81 KB
/
snack-embed.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head>
</head>
<body>
<form action="https://staging.snack.expo.io" method="POST" target="_blank">
<input type="hidden" name="platform" value="ios"/>
<input type="hidden" name="name" value={'Example'} />
<input type="hidden" name="dependencies" value="lodash@*" />
<input type="hidden" name="code" value="this is my code"/>
<button className="snack-inline-example-button">
Try this example on Snack
</button>
</form>
embedded named snack
<iframe src='http://snack.expo.io/embedded/@react-navigation/hello-react-navigation' frameborder='0' style='display: block;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:500px; width:700px'></iframe>
<iframe src='http://snack.expo.io/embedded/@react-navigation/hello-react-navigation' height='100%' width='100%' frameborder='0' style='display: block;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:400px; width:600px'></iframe>
embed script ios
<div data-snack-id="ry5fCdnnB" data-snack-supported-platforms="ios" data-snack-preview="true" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:514px;width:70%"></div>
<p>
embed script android
</p>
<div data-snack-id="ry5fCdnnB" data-snack-platform="android" data-snack-preview="true" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:514px;width:70%"></div>
<p>
Inline snack embed:
</p>
<div data-snack-name="Inline SNACK" data-snack-supported-platforms="android,ios" data-snack-description="inline snack description.... aksljdflajslfjlasjfjlasfl aljsdf lasjfd la sladjflajsdjfjasljdfl lsjflasfj lasjdflas fljalsdjfljaslf" data-snack-code="import%20React%2C%20%7B%20Component%20%7D%20from%20%27react%27%3B%0Aimport%20%7B%20Text%2C%20View%2C%20StyleSheet%2C%20Image%20%7D%20from%20%27react-native%27%3B%0Aimport%20%7B%20Constants%2C%20BlurView%20%7D%20from%20%27expo%27%3B%0A%0Aexport%20default%20class%20App%20extends%20Component%20%7B%0A%20%20render()%20%7B%0A%20%20%20%20return%20(%0A%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.container%7D%3E%0A%20%20%20%20%20%20%20%20%3CText%20style%3D%7Bstyles.paragraph%7D%3E%0A%20%20%20%20%20%20%20%20%20%20Change%20code%20in%20the%20editor%20and%20watch%20it%20change%20on%20your%20phone!%0A%20%20%20%20%20%20%20%20%20%20Save%20to%20get%20a%20shareable%20url.%20You%20get%20a%20new%20url%20each%20time%20you%20save.%0A%20%20%20%20%20%20%20%20%3C%2FText%3E%0A%20%20%20%20%20%20%20%20%3CView%20style%3D%7B%7B%20height%3A%20200%2C%20width%3A%20300%20%7D%7D%3E%0A%20%20%20%20%20%20%20%20%20%20%3CImage%0A%20%20%20%20%20%20%20%20%20%20%20%20source%3D%7B%7B%20uri%3A%20%27http%3A%2F%2Fd23dyxeqlo5psv.cloudfront.net%2Fcrepe.jpg%27%20%7D%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7B%7B%20flex%3A%201%20%7D%7D%0A%20%20%20%20%20%20%20%20%20%20%2F%3E%0A%20%20%20%20%20%20%20%20%20%20%3CBlurView%0A%20%20%20%20%20%20%20%20%20%20%20%20tint%3D%22light%22%0A%20%20%20%20%20%20%20%20%20%20%20%20intensity%3D%7B50%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7BStyleSheet.absoluteFill%7D%0A%20%20%20%20%20%20%20%20%20%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FView%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%3C%2FView%3E%0A%20%20%20%20)%3B%0A%20%20%7D%0A%7D%0A%0Aconst%20styles%20%3D%20StyleSheet.create(%7B%0A%20%20container%3A%20%7B%0A%20%20%20%20flex%3A%201%2C%0A%20%20%20%20alignItems%3A%20%27center%27%2C%0A%20%20%20%20justifyContent%3A%20%27center%27%2C%0A%20%20%20%20paddingTop%3A%20Constants.statusBarHeight%2C%0A%20%20%20%20backgroundColor%3A%20%27%23ecf0f1%27%2C%0A%20%20%7D%2C%0A%20%20paragraph%3A%20%7B%0A%20%20%20%20margin%3A%2024%2C%0A%20%20%20%20fontSize%3A%2018%2C%0A%20%20%20%20fontWeight%3A%20%27bold%27%2C%0A%20%20%20%20textAlign%3A%20%27center%27%2C%0A%20%20%20%20color%3A%20%27%2334495e%27%2C%0A%20%20%7D%2C%0A%7D)%3B%0A" data-snack-platform="ios" data-snack-preview="true" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:514px;width:70%">
</div>
<p>Inline Deps</p>
<div data-snack-code="import%20React%20from%20%27react%27%3B%0Aimport%20%7B%20View%2C%20Text%2C%20Button%20%7D%20from%20%27react-native%27%3B%0Aimport%20%7B%20createAppContainer%2C%20createStackNavigator%2C%20StackActions%2C%20NavigationActions%20%7D%20from%20%27react-navigation%27%3B%20%2F%2F%20Version%20can%20be%20specified%20in%20package.json%0A%0Aclass%20HomeScreen%20extends%20React.Component%20%7B%0A%20%20render%28%29%20%7B%0A%20%20%20%20return%20%28%0A%20%20%20%20%20%20%3CView%20style%3D%7B%7B%20flex%3A%201%2C%20alignItems%3A%20%27center%27%2C%20justifyContent%3A%20%27center%27%20%7D%7D%3E%0A%20%20%20%20%20%20%20%20%3CText%3EHome%20Screen%3C%2FText%3E%0A%20%20%20%20%20%20%20%20%3CButton%0A%20%20%20%20%20%20%20%20%20%20title%3D%22Go%20to%20Details%22%0A%20%20%20%20%20%20%20%20%20%20onPress%3D%7B%28%29%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.props.navigation.dispatch%28StackActions.reset%28%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20index%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20actions%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20NavigationActions.navigate%28%7B%20routeName%3A%20%27Details%27%20%7D%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%29%0A%20%20%20%20%20%20%20%20%20%20%7D%7D%0A%20%20%20%20%20%20%20%20%2F%3E%0A%20%20%20%20%20%20%3C%2FView%3E%0A%20%20%20%20%29%3B%0A%20%20%7D%20%20%0A%7D%0A%0Aclass%20DetailsScreen%20extends%20React.Component%20%7B%0A%20%20render%28%29%20%7B%0A%20%20%20%20return%20%28%0A%20%20%20%20%20%20%3CView%20style%3D%7B%7B%20flex%3A%201%2C%20alignItems%3A%20%27center%27%2C%20justifyContent%3A%20%27center%27%20%7D%7D%3E%0A%20%20%20%20%20%20%20%20%3CText%3EDetails%20Screen%3C%2FText%3E%0A%20%20%20%20%20%20%3C%2FView%3E%0A%20%20%20%20%29%3B%0A%20%20%7D%20%20%0A%7D%0A%0Aconst%20AppNavigator%20%3D%20createStackNavigator%28%7B%0A%20%20Home%3A%20%7B%0A%20%20%20%20screen%3A%20HomeScreen%2C%0A%20%20%7D%2C%0A%20%20Details%3A%20%7B%0A%20%20%20%20screen%3A%20DetailsScreen%2C%0A%20%20%7D%2C%0A%7D%2C%20%7B%0A%20%20%20%20initialRouteName%3A%20%27Home%27%2C%0A%7D%29%3B%0A%0Aexport%20default%20createAppContainer%28AppNavigator%29%3B" data-snack-dependencies='react-navigation@3.11.1'></div>
<p>
AppetizePayerCode:
</p>
<div data-snack-id="r1SVE0CCx" data-snack-platform="ios" data-snack-preview="true" data-snack-appetize-payer-code="yE4fb" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:514px;width:70%" data-=""></div>
<div data-snack-appetize-payer-code="pc_q25cwkfb9j" data-snack-id="SJ-jmshuZ" data-snack-platform="android" data-snack-preview="true" data-snack-theme="light" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:505px;width:70%"></div>
<script async src="http://snack.expo.test/embed.js"></script>
</body>
</html>