From 5026d7dcc52865a8a91c994b8e5e88e6f7795fa1 Mon Sep 17 00:00:00 2001 From: Circle CI Date: Mon, 3 Sep 2018 11:22:55 +0000 Subject: [PATCH] Deploy to GitHub Pages: 6cc83d2be2f67485c69c05cc2e886231f4961586 --- appbar-action.html | 2 +- appbar-back-action.html | 2 +- appbar-content.html | 2 +- appbar-header.html | 2 +- appbar.html | 2 +- bottom-navigation.html | 2 +- button.html | 2 +- caption.html | 2 +- card-actions.html | 2 +- card-content.html | 2 +- card-cover.html | 2 +- card.html | 2 +- checkbox-android.html | 2 +- checkbox-ios.html | 2 +- checkbox.html | 2 +- chip.html | 2 +- contributing.html | 2 +- dialog-actions.html | 2 +- dialog-content.html | 2 +- dialog-scroll-area.html | 2 +- dialog-title.html | 2 +- dialog.html | 2 +- divider.html | 2 +- drawer-item.html | 2 +- drawer-section.html | 2 +- fab-group.html | 2 +- fab.html | 2 +- getting-started.html | 2 +- headline.html | 2 +- helper-text.html | 2 +- icon-button.html | 2 +- icons.html | 2 +- index.html | 2 +- list-accordion.html | 2 +- list-icon.html | 2 +- list-item.html | 2 +- list-section.html | 2 +- modal.html | 2 +- paragraph.html | 2 +- portal-host.html | 2 +- portal.html | 2 +- progress-bar.html | 2 +- radio-button-android.html | 2 +- radio-button-group.html | 2 +- radio-button-ios.html | 2 +- radio-button.html | 2 +- scripts/snack.js | 67 +++++++++++++++++++++++++++++++++++++++ searchbar.html | 2 +- showcase.html | 2 +- snackbar.html | 2 +- subheading.html | 2 +- surface.html | 2 +- switch.html | 2 +- text-input.html | 2 +- text.html | 2 +- theming.html | 2 +- title.html | 2 +- touchable-ripple.html | 2 +- 58 files changed, 124 insertions(+), 57 deletions(-) create mode 100644 scripts/snack.js diff --git a/appbar-action.html b/appbar-action.html index 77e71cd..e38898f 100644 --- a/appbar-action.html +++ b/appbar-action.html @@ -9,4 +9,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/appbar-back-action.html b/appbar-back-action.html index f7879c7..9285aad 100644 --- a/appbar-back-action.html +++ b/appbar-back-action.html @@ -8,4 +8,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/appbar-content.html b/appbar-content.html index 184caba..3aa4eb5 100644 --- a/appbar-content.html +++ b/appbar-content.html @@ -8,4 +8,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/appbar-header.html b/appbar-header.html index d5ceb60..d4a6814 100644 --- a/appbar-header.html +++ b/appbar-header.html @@ -50,4 +50,4 @@ Pass 0 or a custom value to disable the default behaviour.

- \ No newline at end of file + \ No newline at end of file diff --git a/appbar.html b/appbar.html index fce5bd4..5c0c677 100644 --- a/appbar.html +++ b/appbar.html @@ -36,4 +36,4 @@ The bottom bar usually provides access to a drawer and up to four actions.

- \ No newline at end of file + \ No newline at end of file diff --git a/bottom-navigation.html b/bottom-navigation.html index a02d921..593c8b3 100644 --- a/bottom-navigation.html +++ b/bottom-navigation.html @@ -129,4 +129,4 @@ This drastically improves the animation performance.

- \ No newline at end of file + \ No newline at end of file diff --git a/button.html b/button.html index 3b623e7..5464392 100644 --- a/button.html +++ b/button.html @@ -42,4 +42,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/caption.html b/caption.html index f9c4dc8..59fd896 100644 --- a/caption.html +++ b/caption.html @@ -14,4 +14,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/card-actions.html b/card-actions.html index 4ae2084..e145ddb 100644 --- a/card-actions.html +++ b/card-actions.html @@ -17,4 +17,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/card-content.html b/card-content.html index 14f44cf..f785f87 100644 --- a/card-content.html +++ b/card-content.html @@ -16,4 +16,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/card-cover.html b/card-cover.html index 0a2d77d..f6f2a44 100644 --- a/card-cover.html +++ b/card-cover.html @@ -13,4 +13,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/card.html b/card.html index 9d6f2ac..a9944d0 100644 --- a/card.html +++ b/card.html @@ -28,4 +28,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/checkbox-android.html b/checkbox-android.html index e75e2ee..ccfff6a 100644 --- a/checkbox-android.html +++ b/checkbox-android.html @@ -18,4 +18,4 @@ This component follows platform guidelines for Android.

- \ No newline at end of file + \ No newline at end of file diff --git a/checkbox-ios.html b/checkbox-ios.html index a19b405..529ba82 100644 --- a/checkbox-ios.html +++ b/checkbox-ios.html @@ -17,4 +17,4 @@ This component follows platform guidelines for iOS.

- \ No newline at end of file + \ No newline at end of file diff --git a/checkbox.html b/checkbox.html index d228315..05e1280 100644 --- a/checkbox.html +++ b/checkbox.html @@ -46,4 +46,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/chip.html b/chip.html index 2907949..8c57c2f 100644 --- a/chip.html +++ b/chip.html @@ -34,4 +34,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/contributing.html b/contributing.html index 86e52b5..81b81ef 100644 --- a/contributing.html +++ b/contributing.html @@ -62,4 +62,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dialog-actions.html b/dialog-actions.html index e97ed05..8617f00 100644 --- a/dialog-actions.html +++ b/dialog-actions.html @@ -31,4 +31,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dialog-content.html b/dialog-content.html index ec16776..ac24287 100644 --- a/dialog-content.html +++ b/dialog-content.html @@ -30,4 +30,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dialog-scroll-area.html b/dialog-scroll-area.html index d98bd3f..f30d4fa 100644 --- a/dialog-scroll-area.html +++ b/dialog-scroll-area.html @@ -34,4 +34,4 @@ For the scrollable content you can use ScrollView, FlatList window.__INITIAL_PATH__ = 'dialog-scroll-area'; - \ No newline at end of file + \ No newline at end of file diff --git a/dialog-title.html b/dialog-title.html index 8142f4e..c88beac 100644 --- a/dialog-title.html +++ b/dialog-title.html @@ -31,4 +31,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dialog.html b/dialog.html index 8b29065..57adb80 100644 --- a/dialog.html +++ b/dialog.html @@ -48,4 +48,4 @@ To render the Dialog above other components, you'll need to wrap it - \ No newline at end of file + \ No newline at end of file diff --git a/divider.html b/divider.html index ea5082f..dba9cad 100644 --- a/divider.html +++ b/divider.html @@ -18,4 +18,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/drawer-item.html b/drawer-item.html index c27ad40..0325c14 100644 --- a/drawer-item.html +++ b/drawer-item.html @@ -15,4 +15,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/drawer-section.html b/drawer-section.html index 5ec15b5..4a97c73 100644 --- a/drawer-section.html +++ b/drawer-section.html @@ -34,4 +34,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/fab-group.html b/fab-group.html index 061a734..2c3dbfe 100644 --- a/fab-group.html +++ b/fab-group.html @@ -67,4 +67,4 @@ For example, you can set an additional margin if you have a tab bar at the botto - \ No newline at end of file + \ No newline at end of file diff --git a/fab.html b/fab.html index 148a84a..79aa345 100644 --- a/fab.html +++ b/fab.html @@ -27,4 +27,4 @@ Uses label by default if specified.

- \ No newline at end of file + \ No newline at end of file diff --git a/getting-started.html b/getting-started.html index c3f89f5..de48280 100644 --- a/getting-started.html +++ b/getting-started.html @@ -105,4 +105,4 @@ AppRegistry. window.__INITIAL_PATH__ = 'getting-started'; - \ No newline at end of file + \ No newline at end of file diff --git a/headline.html b/headline.html index a51d771..370f184 100644 --- a/headline.html +++ b/headline.html @@ -14,4 +14,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/helper-text.html b/helper-text.html index 3ac9496..487d864 100644 --- a/helper-text.html +++ b/helper-text.html @@ -37,4 +37,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icon-button.html b/icon-button.html index 9c7f614..63b4585 100644 --- a/icon-button.html +++ b/icon-button.html @@ -32,4 +32,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons.html b/icons.html index 9f4bc44..f196c37 100644 --- a/icons.html +++ b/icons.html @@ -40,4 +40,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/index.html b/index.html index 1a3de8d..c89b115 100644 --- a/index.html +++ b/index.html @@ -2,4 +2,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/list-accordion.html b/list-accordion.html index 74d95d4..56ef43e 100644 --- a/list-accordion.html +++ b/list-accordion.html @@ -26,4 +26,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/list-icon.html b/list-icon.html index 12574ae..54d0b42 100644 --- a/list-icon.html +++ b/list-icon.html @@ -12,4 +12,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/list-item.html b/list-item.html index 2e276d5..a48f9dd 100644 --- a/list-item.html +++ b/list-item.html @@ -25,4 +25,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/list-section.html b/list-section.html index 01a3caa..e4a1a12 100644 --- a/list-section.html +++ b/list-section.html @@ -29,4 +29,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modal.html b/modal.html index cddeb53..8351158 100644 --- a/modal.html +++ b/modal.html @@ -32,4 +32,4 @@ To render the Modal above other components, you'll need to wrap it - \ No newline at end of file + \ No newline at end of file diff --git a/paragraph.html b/paragraph.html index dd2ccc2..5feb8e2 100644 --- a/paragraph.html +++ b/paragraph.html @@ -14,4 +14,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/portal-host.html b/portal-host.html index 11b352a..88c8664 100644 --- a/portal-host.html +++ b/portal-host.html @@ -20,4 +20,4 @@ If you're using the Provider component, it already includes P - \ No newline at end of file + \ No newline at end of file diff --git a/portal.html b/portal.html index 2a5bce1..dcd6c13 100644 --- a/portal.html +++ b/portal.html @@ -21,4 +21,4 @@ It requires a Portal.Host component - \ No newline at end of file + \ No newline at end of file diff --git a/progress-bar.html b/progress-bar.html index 6077394..0606cad 100644 --- a/progress-bar.html +++ b/progress-bar.html @@ -16,4 +16,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/radio-button-android.html b/radio-button-android.html index e609701..17e87b2 100644 --- a/radio-button-android.html +++ b/radio-button-android.html @@ -19,4 +19,4 @@ This component follows platform guidelines for Android.

- \ No newline at end of file + \ No newline at end of file diff --git a/radio-button-group.html b/radio-button-group.html index 9cf8583..aabf1f0 100644 --- a/radio-button-group.html +++ b/radio-button-group.html @@ -35,4 +35,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/radio-button-ios.html b/radio-button-ios.html index 33822e7..1ce6428 100644 --- a/radio-button-ios.html +++ b/radio-button-ios.html @@ -18,4 +18,4 @@ This component follows platform guidelines for iOS.

- \ No newline at end of file + \ No newline at end of file diff --git a/radio-button.html b/radio-button.html index 0a0149e..fcee310 100644 --- a/radio-button.html +++ b/radio-button.html @@ -57,4 +57,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/scripts/snack.js b/scripts/snack.js new file mode 100644 index 0000000..d3993f1 --- /dev/null +++ b/scripts/snack.js @@ -0,0 +1,67 @@ +/* eslint-disable strict, no-var, vars-on-top, prefer-template */ + +'use strict'; + +function appendSnackLink() { + var usage = Array.from(document.querySelectorAll('h2')).find( + h => h.textContent === 'Usage' + ); + + if (usage) { + var pre = usage.nextElementSibling; + + while ( + pre.firstChild.tagName !== 'CODE' || + pre.firstChild.className !== 'language-js' + ) { + pre = pre.nextElementSibling; + } + + if (!pre) { + return; + } + + var link; + var insert = true; + + if (pre.nextElementSibling && pre.nextElementSibling.dataset.snack) { + link = pre.nextElementSibling; + insert = false; + } else { + link = document.createElement('a'); + link.dataset.snack = true; + link.target = '_blank'; + link.innerHTML = + 'Try this example on Snack '; + } + + var href = + 'https://snack.expo.io?name=' + + encodeURIComponent(document.title + ' Example') + + '&description=' + + encodeURIComponent(window.location.href) + + '&code=' + + encodeURIComponent(pre.textContent); + + if (link.href === href) { + return; + } + + link.href = href; + + if (insert) { + pre.insertAdjacentElement('afterend', link); + } + } +} + +appendSnackLink(); + +var mutationObserver = new MutationObserver(mutations => { + mutations.forEach(appendSnackLink); +}); + +mutationObserver.observe(document.documentElement, { + childList: true, + subtree: true, +}); diff --git a/searchbar.html b/searchbar.html index ad874cf..db4c89e 100644 --- a/searchbar.html +++ b/searchbar.html @@ -36,4 +36,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/showcase.html b/showcase.html index 133194c..5230dfd 100644 --- a/showcase.html +++ b/showcase.html @@ -2,4 +2,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/snackbar.html b/snackbar.html index c86a026..eb68f14 100644 --- a/snackbar.html +++ b/snackbar.html @@ -64,4 +64,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/subheading.html b/subheading.html index b47e40f..d617201 100644 --- a/subheading.html +++ b/subheading.html @@ -14,4 +14,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/surface.html b/surface.html index 060c4bc..01a04f2 100644 --- a/surface.html +++ b/surface.html @@ -31,4 +31,4 @@ A shadow can be applied by specifying the elevation property both o - \ No newline at end of file + \ No newline at end of file diff --git a/switch.html b/switch.html index 58d1f31..8c95572 100644 --- a/switch.html +++ b/switch.html @@ -47,4 +47,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/text-input.html b/text-input.html index e725cfc..af26a3f 100644 --- a/text-input.html +++ b/text-input.html @@ -61,4 +61,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/text.html b/text.html index 7189c7b..94a2ccd 100644 --- a/text.html +++ b/text.html @@ -3,4 +3,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/theming.html b/theming.html index ec92843..b05a46a 100644 --- a/theming.html +++ b/theming.html @@ -104,4 +104,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/title.html b/title.html index da492ac..432d912 100644 --- a/title.html +++ b/title.html @@ -14,4 +14,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/touchable-ripple.html b/touchable-ripple.html index a80755a..3433e39 100644 --- a/touchable-ripple.html +++ b/touchable-ripple.html @@ -28,4 +28,4 @@ On unsupported platforms, it falls back to a highlight effect.

- \ No newline at end of file + \ No newline at end of file