How to use sweet method in wpt

Best JavaScript code snippet using wpt

tabs.snippetcode.ts

Source:tabs.snippetcode.ts Github

copy

Full Screen

1import { snippetCode } from '@core/components/card-snippet/card-snippet.component';2export const snippetCodeBasicTab: snippetCode = {3 html: `4 <ul ngbNav #nav="ngbNav" class="nav-tabs">5 <li ngbNavItem>6 <a ngbNavLink>Home</a>7 <ng-template ngbNavContent>8 <p>9 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes10 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing11 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder12 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels13 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw14 sweet roll.15 </p>16 </ng-template>17 </li>18 <li ngbNavItem>19 <a ngbNavLink>Service</a>20 <ng-template ngbNavContent>21 <p>22 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon23 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.24 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu25 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet26 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread27 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o28 carrot cake cookie cake.29 </p>30 </ng-template>31 </li>32 <li ngbNavItem [disabled]="true">33 <a href="javascript:void(0)" ngbNavLink>Disabled</a>34 <ng-template ngbNavContent>35 <p>36 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops37 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet38 roll cake icing cookie halvah cupcake.39 </p>40 </ng-template>41 </li>42 <li ngbNavItem>43 <a ngbNavLink>Account</a>44 <ng-template ngbNavContent>45 <p>46 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar47 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie48 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.49 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee50 fruitcake ice cream powder tootsie roll cake.51 </p>52 </ng-template>53 </li>54</ul>55<div [ngbNavOutlet]="nav" class="mt-2"></div>56 `57};58export const snippetCodeIconTab: snippetCode = {59 html: `60 <ul ngbNav #navWithIcons="ngbNav" class="nav-tabs">61 <li ngbNavItem>62 <a ngbNavLink><span [data-feather]="'cast'"></span> Home</a>63 <ng-template ngbNavContent>64 <p>65 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes66 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing67 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder68 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels69 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw70 sweet roll.71 </p>72 </ng-template>73 </li>74 <li ngbNavItem>75 <a ngbNavLink><span [data-feather]="'settings'"></span> Service</a>76 <ng-template ngbNavContent>77 <p>78 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon79 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.80 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu81 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet82 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread83 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o84 carrot cake cookie cake.85 </p>86 </ng-template>87 </li>88 <li ngbNavItem [disabled]="true">89 <a href="javascript:void(0)" ngbNavLink><span [data-feather]="'lock'"></span> Disabled</a>90 <ng-template ngbNavContent>91 <p>92 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops93 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet94 roll cake icing cookie halvah cupcake.95 </p>96 </ng-template>97 </li>98 <li ngbNavItem>99 <a ngbNavLink><span [data-feather]="'award'"></span> Account</a>100 <ng-template ngbNavContent>101 <p>102 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar103 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie104 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.105 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee106 fruitcake ice cream powder tootsie roll cake.107 </p>108 </ng-template>109 </li>110 </ul>111 <div [ngbNavOutlet]="navWithIcons" class="mt-2"></div>112 `113};114export const snippetCodeVerticalLeftTabs: snippetCode = {115 html: `116 <div class="nav-vertical">117 <ul ngbNav #navVertical="ngbNav" class="nav nav-tabs nav-left flex-column">118 <li ngbNavItem>119 <a ngbNavLink>Tab 1</a>120 <ng-template ngbNavContent>121 <p>122 Oat cake marzipan cake lollipop caramels wafer pie jelly beans. Icing halvah chocolate cake123 carrot cake. Jelly beans carrot cake marshmallow gingerbread chocolate cake. Gummies cupcake124 croissant.125 </p>126 </ng-template>127 </li>128 <li ngbNavItem>129 <a ngbNavLink>Tab 2</a>130 <ng-template ngbNavContent>131 <p>132 Sugar plum tootsie roll biscuit caramels. Liquorice brownie pastry cotton candy oat cake133 fruitcake jelly chupa chups. Pudding caramels pastry powder cake soufflé wafer caramels. Jelly-o134 pie cupcake.135 </p>136 </ng-template>137 </li>138 <li ngbNavItem>139 <a ngbNavLink>Tab 3 </a>140 <ng-template ngbNavContent>141 <p>142 Biscuit ice cream halvah candy canes bear claw ice cream cake chocolate bar donut. Toffee cotton143 candy liquorice. Oat cake lemon drops gingerbread dessert caramels. Sweet dessert jujubes powder144 sweet sesame snaps.145 </p>146 </ng-template>147 </li>148 </ul>149 <div [ngbNavOutlet]="navVertical"></div>150</div>151 `152};153export const snippetCodeVerticalRightTabs: snippetCode = {154 html: `155 <div class="nav-vertical">156 <ul ngbNav #navVerticalRight="ngbNav" class="nav nav-tabs nav-right flex-column">157 <li ngbNavItem>158 <a ngbNavLink>Tab 1</a>159 <ng-template ngbNavContent>160 <p>161 Oat cake marzipan cake lollipop caramels wafer pie jelly beans. Icing halvah chocolate cake162 carrot cake. Jelly beans carrot cake marshmallow gingerbread chocolate cake. Gummies cupcake163 croissant.164 </p>165 </ng-template>166 </li>167 <li ngbNavItem>168 <a ngbNavLink>Tab 2</a>169 <ng-template ngbNavContent>170 <p>171 Sugar plum tootsie roll biscuit caramels. Liquorice brownie pastry cotton candy oat cake172 fruitcake jelly chupa chups. Pudding caramels pastry powder cake soufflé wafer caramels. Jelly-o173 pie cupcake.174 </p>175 </ng-template>176 </li>177 <li ngbNavItem>178 <a ngbNavLink>Tab 3 </a>179 <ng-template ngbNavContent>180 <p>181 Biscuit ice cream halvah candy canes bear claw ice cream cake chocolate bar donut. Toffee cotton182 candy liquorice. Oat cake lemon drops gingerbread dessert caramels. Sweet dessert jujubes powder183 sweet sesame snaps.184 </p>185 </ng-template>186 </li>187 </ul>188 <div [ngbNavOutlet]="navVerticalRight"></div>189</div>190 `191};192export const snippetCodeFilled: snippetCode = {193 html: `194 <ul ngbNav #navFilled="ngbNav" class="nav-tabs nav-fill">195 <li ngbNavItem>196 <a ngbNavLink>Home</a>197 <ng-template ngbNavContent>198 <p>199 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes200 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing201 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder202 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels203 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw204 sweet roll.205 </p>206 </ng-template>207 </li>208 <li ngbNavItem>209 <a ngbNavLink>Service</a>210 <ng-template ngbNavContent>211 <p>212 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon213 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.214 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu215 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet216 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread217 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o218 carrot cake cookie cake.219 </p>220 </ng-template>221 </li>222 <li ngbNavItem [disabled]="true">223 <a href="javascript:void(0)" ngbNavLink>Disabled</a>224 <ng-template ngbNavContent>225 <p>226 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops227 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet228 roll cake icing cookie halvah cupcake.229 </p>230 </ng-template>231 </li>232 <li ngbNavItem>233 <a ngbNavLink>Account</a>234 <ng-template ngbNavContent>235 <p>236 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar237 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie238 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.239 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee240 fruitcake ice cream powder tootsie roll cake.241 </p>242 </ng-template>243 </li>244</ul>245<div [ngbNavOutlet]="navFilled" class="mt-2"></div>246 `247};248export const snippetCodeJustified: snippetCode = {249 html: `250 <ul ngbNav #navJustified="ngbNav" class="nav-tabs nav-justified">251 <li ngbNavItem>252 <a ngbNavLink>Home</a>253 <ng-template ngbNavContent>254 <p>255 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes256 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing257 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder258 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels259 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw260 sweet roll.261 </p>262 </ng-template>263 </li>264 <li ngbNavItem>265 <a ngbNavLink>Service</a>266 <ng-template ngbNavContent>267 <p>268 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon269 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.270 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu271 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet272 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread273 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o274 carrot cake cookie cake.275 </p>276 </ng-template>277 </li>278 <li ngbNavItem [disabled]="true">279 <a href="javascript:void(0)" ngbNavLink>Disabled</a>280 <ng-template ngbNavContent>281 <p>282 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops283 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet284 roll cake icing cookie halvah cupcake.285 </p>286 </ng-template>287 </li>288 <li ngbNavItem>289 <a ngbNavLink>Account</a>290 <ng-template ngbNavContent>291 <p>292 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar293 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie294 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.295 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee296 fruitcake ice cream powder tootsie roll cake.297 </p>298 </ng-template>299 </li>300</ul>301<div [ngbNavOutlet]="navJustified" class="mt-2"></div>302 `303};304export const snippetCodeCenter: snippetCode = {305 html: `306 <ul ngbNav #navCenter="ngbNav" class="nav-tabs justify-content-center">307 <li ngbNavItem>308 <a ngbNavLink>Home</a>309 <ng-template ngbNavContent>310 <p>311 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes312 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing313 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder314 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels315 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw316 sweet roll.317 </p>318 </ng-template>319 </li>320 <li ngbNavItem>321 <a ngbNavLink>Service</a>322 <ng-template ngbNavContent>323 <p>324 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon325 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.326 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu327 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet328 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread329 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o330 carrot cake cookie cake.331 </p>332 </ng-template>333 </li>334 <li ngbNavItem [disabled]="true">335 <a href="javascript:void(0)" ngbNavLink>Disabled</a>336 <ng-template ngbNavContent>337 <p>338 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops339 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet340 roll cake icing cookie halvah cupcake.341 </p>342 </ng-template>343 </li>344 <li ngbNavItem>345 <a ngbNavLink>Account</a>346 <ng-template ngbNavContent>347 <p>348 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar349 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie350 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.351 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee352 fruitcake ice cream powder tootsie roll cake.353 </p>354 </ng-template>355 </li>356</ul>357<div [ngbNavOutlet]="navCenter" class="mt-2"></div>358 `359};360export const snippetCodeEnd: snippetCode = {361 html: `362 <ul ngbNav #navEnd="ngbNav" class="nav-tabs justify-content-end">363 <li ngbNavItem>364 <a ngbNavLink>Home</a>365 <ng-template ngbNavContent>366 <p>367 Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes368 marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing369 croissant bonbon biscuit gummi bears. Pudding candy canes sugar plum cookie chocolate cake powder370 croissant. Carrot cake tiramisu danish candy cake muffin croissant tart dessert. Tiramisu caramels371 candy canes chocolate cake sweet roll liquorice icing cupcake. Candy cookie sweet roll bear claw372 sweet roll.373 </p>374 </ng-template>375 </li>376 <li ngbNavItem>377 <a ngbNavLink>Service</a>378 <ng-template ngbNavContent>379 <p>380 Muffin cupcake candy chocolate cake gummi bears fruitcake donut dessert pie. Wafer toffee bonbon381 dragée. Jujubes cotton candy gummies chupa chups. Sweet fruitcake cheesecake biscuit cotton candy.382 Cookie powder marshmallow donut. Candy cookie sweet roll bear claw sweet roll. Cake tiramisu383 cotton candy gingerbread cheesecake toffee cake. Cookie liquorice dessert candy canes jelly. Sweet384 chocolate muffin fruitcake gummies jujubes pie lollipop. Brownie marshmallow caramels gingerbread385 jelly beans chocolate bar oat cake wafer. Chocolate bar danish icing sweet apple pie jelly-o386 carrot cake cookie cake.387 </p>388 </ng-template>389 </li>390 <li ngbNavItem [disabled]="true">391 <a href="javascript:void(0)" ngbNavLink>Disabled</a>392 <ng-template ngbNavContent>393 <p>394 Cake croissant lemon drops gummi bears carrot cake biscuit cupcake croissant. Macaroon lemon drops395 muffin jelly sugar plum chocolate cupcake danish icing. Soufflé tootsie roll lemon drops sweet396 roll cake icing cookie halvah cupcake.397 </p>398 </ng-template>399 </li>400 <li ngbNavItem>401 <a ngbNavLink>Account</a>402 <ng-template ngbNavContent>403 <p>404 Chocolate croissant cupcake croissant jelly donut. Cheesecake toffee apple pie chocolate bar405 biscuit tart croissant. Lemon drops danish cookie. Oat cake macaroon icing tart lollipop cookie406 sweet bear claw. Carrot cake dragée chocolate. Lemon drops ice cream wafer gummies dragée.407 Chocolate bar liquorice cheesecake cookie chupa chups marshmallow oat cake biscuit. Dessert toffee408 fruitcake ice cream powder tootsie roll cake.409 </p>410 </ng-template>411 </li>412</ul>413<div [ngbNavOutlet]="navEnd" class="mt-2"></div>414 `...

Full Screen

Full Screen

sweet-alerts.snippetcode.ts

Source:sweet-alerts.snippetcode.ts Github

copy

Full Screen

1import { snippetCode } from '@core/components/card-snippet/card-snippet.component';2export const snippetCodeBasic: snippetCode = {3 html: `4 <!-- Sweet Alert Basic -->5 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertBasic" rippleEffect>Basic</button>6 <swal7 #SweetAlertBasic8 title="Any fool can use a computer"9 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"10 >11 </swal>12 <!-- Sweet Alert With Title -->13 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertWithTitle" rippleEffect>14 With Title15 </button>16 <swal17 #SweetAlertWithTitle18 title="The Internet?,"19 text="That thing is still around?"20 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"21 >22 </swal>23 <!-- Sweet Alert With Footer -->24 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertWithFooter" rippleEffect>25 With Footer26 </button>27 <!-- Swal of Sweet Alert With Footer -->28 <swal29 #SweetAlertWithFooter30 title="Oops..."31 text="Something went wrong!"32 icon="error"33 [focusCancel]="true"34 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"35 [footer]="'<a href=\'javascript:void(0)\'>Why do I have this issue?</a>'"36 >37 </swal>38 <!--/ Swal of Sweet Alert With Footer -->39 <!-- Sweet Alert HTML -->40 <button class="btn btn-outline-primary mb-1" [swal]="SweetAlertHTML" rippleEffect>HTML</button>41 <!-- Swal of Sweet Alert HTML -->42 <swal43 #SweetAlertHTML44 title="<strong>HTML <u>example</u></strong>"45 text="Something went wrong!"46 html='You can use <b>bold text</b>, <a href="https://pixinvent.com/" target="_blank">links</a> and other HTML tags'47 icon="info"48 [focusCancel]="true"49 [showCloseButton]="true"50 [swalOptions]="{ cancelButtonClass: 'btn btn-danger ml-1', confirmButtonClass: 'btn btn-primary' }"51 [confirmButtonText]="'<i class=\'feather icon-thumbs-up\' mr-25></i> Great!'"52 [cancelButtonText]="'<i class=\'feather icon-thumbs-down\'></i>'"53 [showCancelButton]="true"54 >55 </swal>56 <!-- Swal of Sweet Alert HTML -->57 `58};59export const snippetCodePosition: snippetCode = {60 html: `61 <!-- Sweet Alert With Position top-start -->62 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertTopStart" rippleEffect>63 Top Start64 </button>65 <!-- Swal of Sweet Alert With Position top-start -->66 <swal67 #SweetAlertTopStart68 title="Your work has been saved"69 icon="success"70 [showConfirmButton]="false"71 [timer]="1500"72 [position]="'top-start'"73 >74 </swal>75 <!--/ Swal of Sweet Alert With Position top-start -->76 <!-- Sweet Alert With Position top-end -->77 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertTopEnd" rippleEffect>Top End</button>78 <!-- Swal of Sweet Alert With Position top-end -->79 <swal80 #SweetAlertTopEnd81 title="Your work has been saved"82 icon="success"83 [showConfirmButton]="false"84 [timer]="1500"85 [position]="'top-end'"86 >87 </swal>88 <!--/ Swal of Sweet Alert With Position top-end -->89 <!-- Sweet Alert With Position bottom-start -->90 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertBottomStart" rippleEffect>91 Bottom Start92 </button>93 <!-- Swal of Sweet Alert With Position bottom-start -->94 <swal95 #SweetAlertBottomStart96 title="Your work has been saved"97 icon="success"98 [showConfirmButton]="false"99 [timer]="1500"100 [position]="'bottom-start'"101 >102 </swal>103 <!--/ Swal of Sweet Alert With Position bottom-start -->104 <!-- Sweet Alert With Position bottom-end -->105 <button class="btn btn-outline-primary mb-1" [swal]="SweetAlertBottomEnd" rippleEffect>Bottom End</button>106 <!-- Swal of Sweet Alert With Position bottom-end -->107 <swal108 #SweetAlertBottomEnd109 title="Your work has been saved"110 icon="success"111 [showConfirmButton]="false"112 [timer]="1500"113 [position]="'bottom-end'"114 >115 </swal>116 <!--/ Swal of Sweet Alert With Position bottom-end -->117`118};119export const snippetCodeAnimations: snippetCode = {120 html: `121 <!-- Sweet Alert With Bounce In -->122 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertBounceIn" rippleEffect>123 Bounce In124 </button>125 <!-- Swal of Sweet Alert With Bounce In -->126 <swal127 #SweetAlertBounceIn128 title="BounceIn Animation"129 [animation]="true"130 [showClass]="{ popup: 'animate__animated animate__bounceIn' }"131 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"132 >133 </swal>134 <!--/ Swal of Sweet Alert With Bounce In -->135 <!-- Sweet Alert With Fade In -->136 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertFadeIn" rippleEffect>Fade In</button>137 <!-- Swal of Sweet Alert With Fade In -->138 <swal139 #SweetAlertFadeIn140 title="FadeIn Animation"141 [animation]="true"142 [showClass]="{ popup: 'animate__animated animate__fadeIn' }"143 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"144 >145 </swal>146 <!--/ Swal of Sweet Alert With Fade In -->147 <!-- Sweet Alert With Flip In -->148 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertFlipIn" rippleEffect>Flip In</button>149 <!-- Swal of Sweet Alert With Flip In -->150 <swal151 #SweetAlertFlipIn152 title="FlipIn Animation"153 [animation]="true"154 [showClass]="{ popup: 'animate__animated animate__flipInX' }"155 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"156 >157 </swal>158 <!--/ Swal of Sweet Alert With Flip In -->159 <!-- Sweet Alert With Tada -->160 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertTada" rippleEffect>Tada</button>161 <!-- Swal of Sweet Alert With Tada -->162 <swal163 #SweetAlertTada164 title="Tada Animation"165 [animation]="true"166 [showClass]="{ popup: 'animate__animated animate__tada' }"167 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"168 >169 </swal>170 <!--/ Swal of Sweet Alert With Tada -->171 <!-- Sweet Alert With Shake -->172 <button class="btn btn-outline-primary mr-1 mb-1" [swal]="SweetAlertShake" rippleEffect>Shake</button>173 <!-- Swal of Sweet Alert With Shake -->174 <swal175 #SweetAlertShake176 title="Shake Animation"177 [animation]="true"178 [showClass]="{ popup: 'animate__animated animate__shakeX' }"179 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"180 >181 </swal>182 <!--/ Swal of Sweet Alert With Shake -->183`184};185export const snippetCodeTypes: snippetCode = {186 html: `187 <!-- Sweet Alert success -->188 <button class="btn btn-outline-success mr-1 mb-1" [swal]="SweetAlertSuccess" rippleEffect>Success</button>189 <swal190 #SweetAlertSuccess191 title="Good job!"192 text="You clicked the button!"193 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"194 icon="success"195 >196 </swal>197 <!-- Sweet Alert Info -->198 <button class="btn btn-outline-info mr-1 mb-1" [swal]="SweetAlertInfo" rippleEffect>Info</button>199 <swal200 #SweetAlertInfo201 title="Good job!"202 text="You clicked the button!"203 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"204 icon="info"205 >206 </swal>207 <!-- Sweet Alert Warning -->208 <button class="btn btn-outline-warning mr-1 mb-1" [swal]="SweetAlertWarning" rippleEffect>Warning</button>209 <swal210 #SweetAlertWarning211 title="Good job!"212 text="You clicked the button!"213 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"214 icon="warning"215 >216 </swal>217 <!-- Sweet Alert Error -->218 <button class="btn btn-outline-danger mr-1 mb-1" [swal]="SweetAlertError" rippleEffect>Error</button>219 <swal220 #SweetAlertError221 title="Good job!"222 text="You clicked the button!"223 [swalOptions]="{ confirmButtonClass: 'btn btn-primary' }"224 icon="error"225 >226 </swal>227`228};229export const snippetCodeCustomImage: snippetCode = {230 html: `231 <!-- Sweet Alert Custom Image -->232 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertCustomImage" rippleEffect>233 Custom Image234 </button>235 <!-- Swal of Sweet Alert Custom Image -->236 <swal237 #SweetAlertCustomImage238 title="Sweet!"239 text="Modal with a custom image."240 [swalOptions]="{241 imageUrl: 'assets/images/slider/04.jpg',242 imageWidth: 400,243 imageHeight: 200,244 imageAlt: 'Custom image',245 confirmButtonClass: 'btn btn-primary'246 }"247 >248 </swal>249 <!-- Swal of Sweet Alert Custom Image -->250`251};252export const snippetCodeAutoClose: snippetCode = {253 html: `254 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertAutoClose" rippleEffect>Auto Close</button>255 <!-- Swal of Sweet Alert Auto Close -->256 <swal257 #SweetAlertAutoClose258 title="Auto close alert!"259 html="I will close in <strong></strong> seconds."260 [swalOptions]="{ confirmButtonClass: 'btn btn-primary', buttonsStyling: false }"261 [timer]="2000"262 (beforeOpen)="autoCloseBeforeOpen($event)"263 (close)="onAutoClose()"264 >265 </swal>266 <!-- Swal of Sweet Alert Auto Close -->267`,268 ts: `269private timerInterval: any;270autoCloseBeforeOpen(event: BeforeOpenEvent) {271 Swal.showLoading();272 this.timerInterval = setInterval(function () {273 let timeLeft: HTMLElement = event.modalElement.querySelector('strong');274 timeLeft.textContent = <any>Swal.getTimerLeft();275 }, 100);276}277onAutoClose() {278 clearInterval(this.timerInterval);279}280`281};282export const snippetCodeQuestion: snippetCode = {283 html: `284 <!-- Sweet Alert Question -->285 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertQuestion" rippleEffect>Question</button>286 <!-- Swal of Sweet Alert Question -->287 <swal #SweetAlertQuestion (beforeOpen)="questionBeforeOpen()"> </swal>288 <!-- Swal of Sweet Alert Question -->289`,290 ts: `291 questionBeforeOpen() {292 Swal.mixin({293 input: 'text',294 confirmButtonText: 'Next &rarr;',295 showCancelButton: true,296 progressSteps: ['1', '2', '3'],297 customClass: {298 confirmButton: 'btn btn-primary',299 cancelButton: 'btn btn-danger ml-1'300 }301 })302 .queue([303 {304 title: 'Question 1',305 text: 'Chaining swal2 modals is easy'306 },307 'Question 2',308 'Question 3'309 ])310 .then(function (result) {311 if (result.value) {312 Swal.fire({313 title: 'All done!',314 html: 'Your answers: <code>' + JSON.stringify(result.value) + '</code>',315 confirmButtonText: 'Lovely!',316 customClass: { confirmButton: 'btn btn-primary' }317 });318 }319 });320 }321`322};323export const snippetCodeAjax: snippetCode = {324 html: `325 <!-- Sweet Alert Ajax -->326 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertAjax" rippleEffect>Ajax</button>327 <!-- Swal of Sweet Alert Ajax -->328 <swal #SweetAlertAjax (open)="ajaxOpen()"></swal>329 <!-- Swal of Sweet Alert Ajax -->330`,331 ts: `332 ajaxOpen() {333 Swal.fire({334 title: 'Search for a user',335 input: 'text',336 showCancelButton: true,337 confirmButtonText: 'Look up',338 showLoaderOnConfirm: true,339 customClass: {340 confirmButton: 'btn btn-primary',341 cancelButton: 'btn btn-danger ml-1'342 },343 preConfirm: function (login) {344 return fetch('//api.github.com/users/' + login + '')345 .then(function (response) {346 if (!response.ok) {347 console.log(response);348 throw new Error(response.statusText);349 }350 return response.json();351 })352 .catch(function (error) {353 Swal.showValidationMessage('Request failed: ' + error + '');354 });355 },356 allowOutsideClick: function () {357 return !Swal.isLoading();358 }359 }).then(function (result) {360 if (result.value) {361 Swal.fire({362 title: '' + result.value.login + "'s avatar",363 imageUrl: result.value.avatar_url,364 customClass: { confirmButton: 'btn btn-primary' }365 });366 }367 });368 }369`370};371export const snippetCodeConfirmText: snippetCode = {372 html: `373 <!-- Sweet Alert ConfirmText -->374 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertConfirmText" rippleEffect>375 Confirm Text376 </button>377 <!-- Swal of Sweet Alert ConfirmText -->378 <swal #SweetAlertConfirmText (open)="ConfirmTextOpen()"></swal>379 <!-- Swal of Sweet Alert ConfirmText -->380`,381 ts: `382 ConfirmTextOpen() {383 Swal.fire({384 title: 'Are you sure?',385 text: "You won't be able to revert this!",386 icon: 'warning',387 showCancelButton: true,388 confirmButtonColor: '#7367F0',389 cancelButtonColor: '#E42728',390 confirmButtonText: 'Yes, delete it!',391 customClass: {392 confirmButton: 'btn btn-primary',393 cancelButton: 'btn btn-danger ml-1'394 }395 }).then(function (result) {396 if (result.value) {397 Swal.fire({398 icon: 'success',399 title: 'Deleted!',400 text: 'Your file has been deleted.',401 customClass: {402 confirmButton: 'btn btn-success'403 }404 });405 }406 });407 }408`409};410export const snippetCodeConfirmColor: snippetCode = {411 html: `412 <!-- Sweet Alert ConfirmColor -->413 <button class="btn btn-outline-primary mr-1" [swal]="SweetAlertConfirmColor" rippleEffect>414 Confirm Button Color415 </button>416 <!-- Swal of Sweet Alert ConfirmColor -->417 <swal #SweetAlertConfirmColor (open)="ConfirmColorOpen()"></swal>418 <!-- Swal of Sweet Alert ConfirmColor -->419`,420 ts: `421 ConfirmColorOpen() {422 Swal.fire({423 title: 'Are you sure?',424 text: "You won't be able to revert this!",425 icon: 'warning',426 showCancelButton: true,427 confirmButtonText: 'Yes, delete it!',428 customClass: {429 confirmButton: 'btn btn-primary',430 cancelButton: 'btn btn-danger ml-1'431 }432 }).then(function (result) {433 if (result.value) {434 Swal.fire({435 title: 'Deleted!',436 text: 'Your file has been deleted.',437 icon: 'success',438 customClass: {439 confirmButton: 'btn btn-success'440 }441 });442 } else if (result.dismiss === Swal.DismissReason.cancel) {443 Swal.fire({444 title: 'Cancelled',445 text: 'Your imaginary file is safe :)',446 icon: 'error',447 customClass: {448 confirmButton: 'btn btn-success'449 }450 });451 }452 });453 }454`...

Full Screen

Full Screen

app.js

Source:app.js Github

copy

Full Screen

1var SweetAlert_custom = {2 init: function() {3 document.querySelector('.sweet-1').onclick = function(){4 swal("Комилов Сардорбек! Сизни ишингиз бошланди.");5 }, document.querySelector('.sweet-2').onclick = function(){6 swal("Here's the title!", "...and here's the text!");7 }, document.querySelector('.sweet-3').onclick = function(){8 swal("Good job!", "You clicked the button!", "info");9 }, document.querySelector('.sweet-4').onclick = function(){10 swal("Click on either the button or outside the modal.")11 .then((value) => {12 swal(`The returned value is: ${value}`);13 });14 }, document.querySelector('.sweet-5').onclick = function(){15 swal({16 title: "Are you sure?",17 text: "Once deleted, you will not be able to recover this imaginary file!",18 icon: "warning",19 buttons: true,20 dangerMode: true,21 })22 .then((willDelete) => {23 if (willDelete) {24 swal("Poof! Your imaginary file has been deleted!", {25 icon: "success",26 });27 } else {28 swal("Your imaginary file is safe!");29 }30 })31 }, document.querySelector('.sweet-6').onclick = function(){32 swal("Good job!", "You clicked the button!", "warning");33 }, document.querySelector('.sweet-7').onclick = function(){34 swal("Good job!", "You clicked the button!", "error");35 }, document.querySelector('.sweet-8').onclick = function(){36 swal("Good job!", "You clicked the button!", "success");37 }, document.querySelector('.sweet-9').onclick = function(){38 swal("Good job!", "You clicked the button!", "info");39 }, document.querySelector('.sweet-10').onclick = function(){40 swal("Are you sure you want to do this?", {41 buttons: ["Oh noez!", "Aww yiss!"],42 });43 }, document.querySelector('.sweet-11').onclick = function(){44 swal("Are you sure you want to do this?", {45 buttons: ["Oh noez!", "Aww yiss!"],46 });47 }, document.querySelector('.sweet-12').onclick = function(){48 swal("A wild Pikachu appeared! What do you want to do?", {49 buttons: {50 cancel: "Run away!",51 catch: {52 text: "Throw Pokéball!",53 value: "catch",54 },55 defeat: true,56 },57 })58 .then((value) => {59 switch (value) {60 case "defeat":61 swal("Pikachu fainted! You gained 500 XP!");62 break;63 case "catch":64 swal("Gotcha!", "Pikachu was caught!", "success");65 break;66 default:67 swal("Got away safely!");68 }69 });70 }, document.querySelector('.sweet-13').onclick = function(){71 swal("Write something here:", {72 content: "input",73 })74 .then((value) => {75 swal(`You typed: ${value}`);76 });77 };78 }79};80(function($) {81 SweetAlert_custom.init() ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var api = new wpt('www.webpagetest.org');3api.runTest(url, function(err, data) {4 if (err) {5 console.log(err);6 } else {7 console.log(data);8 }9});10var WebPageTest = require('webpagetest');11var wpt = new WebPageTest('www.webpagetest.org');12 if (err) {13 console.log(err);14 } else {15 console.log(data);16 }17});18var WebPageTest = require('webpagetest');19var wpt = new WebPageTest('www.webpagetest.org');20 if (err) {21 console.log(err);22 } else {23 console.log(data);24 }25});26var WebPageTest = require('webpagetest');27var wpt = new WebPageTest('www.webpagetest.org');28 if (err) {29 console.log(err);30 } else {31 console.log(data);32 }33});34var WebPageTest = require('webpagetest');35var wpt = new WebPageTest('www.webpagetest.org');36 if (err) {37 console.log(err);38 } else {39 console.log(data);40 }41});42var WebPageTest = require('webpagetest');43var wpt = new WebPageTest('www.webpagetest.org');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var api = new wpt('www.webpagetest.org');3}, function(err, data) {4 if (err) return console.error(err);5 console.log('Test status:', data.statusText);6 if (data.statusCode == 200) {7 console.log('Test completed in', data.data.average.firstView.loadTime, 'ms');8 }9});10var wpt = require('webpagetest');11var api = new wpt('www.webpagetest.org');12}, function(err, data) {13 if (err) return console.error(err);14 console.log('Test status:', data.statusText);15 if (data.statusCode == 200) {16 console.log('Test completed in', data.data.average.firstView.loadTime, 'ms');17 }18});19var wpt = require('webpagetest');20var api = new wpt('www.webpagetest.org');21}, function(err, data) {22 if (err) return console.error(err);23 console.log('Test status:', data.statusText);24 if (data.statusCode == 200) {25 console.log('Test completed in', data.data.average.firstView.loadTime, 'ms');26 }27});

Full Screen

Using AI Code Generation

copy

Full Screen

1var WebPageTest = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org');3 if (err) return console.error(err);4 console.log('Test submitted to WebPagetest for %s, waiting for results...', data.data.url);5 wpt.waitForTestResults(data.data.testId, function(err, data) {6 if (err) return console.error(err);7 console.log('SpeedIndex: %s', data.data.median.firstView.SpeedIndex);8 });9});10var WebPageTest = require('webpagetest');11var wpt = new WebPageTest('www.webpagetest.org');12 if (err) return console.error(err);13 console.log('Test submitted to WebPagetest for %s, waiting for results...', data.data.url);14 wpt.waitForTestResults(data.data.testId, function(err, data) {15 if (err) return console.error(err);16 console.log('SpeedIndex: %s', data.data.median.firstView.SpeedIndex);17 });18});19var WebPageTest = require('webpagetest');20var wpt = new WebPageTest('www.webpagetest.org');21 if (err) return console.error(err);22 console.log('Test submitted to WebPagetest for %s, waiting for results...', data.data.url);23 wpt.waitForTestResults(data.data.testId, function

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var config = require('./config.json');3var wpt = new WebPageTest('www.webpagetest.org', config.api_key);4var test_options = {5};6wpt.runTest(test_url, test_options, function(err, data) {7 if (err) return console.log(err);8 console.log('Test ID: ' + data.data.testId);9 var testId = data.data.testId;10 wpt.getTestResults(testId, function(err, data) {11 if (err) return console.log(err);12 console.log(data.data);13 });14});

Full Screen

Using AI Code Generation

copy

Full Screen

1var request = require('request');2var fs = require('fs');3var options = {4 headers: {5 }6};7request(options, function(err, res, body) {8 if (err) {9 console.log(err);10 } else {11 console.log(res.statusCode);12 var data = JSON.parse(body);13 console.log(data.data.testId);14 var testId = data.data.testId;15 var options1 = {16 headers: {17 }18 };19 request(options1, function(err, res, body) {20 if (err) {21 console.log(err);22 } else {23 console.log(res.statusCode);24 var data = JSON.parse(body);25 console.log(data);26 fs.writeFile('test.json', JSON.stringify(data), function(err) {27 if (err) {28 console.log(err);29 }30 });31 }32 });33 }34});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful