Skip to content

Instantly share code, notes, and snippets.

View liamgriffin's full-sized avatar

Liam Griffin liamgriffin

  • Shopify
  • Galway, Ireland
View GitHub Profile
@liamgriffin
liamgriffin / accessibilityHint.jsx
Created May 18, 2021 16:19
Creating Accessible React Native Apps | accessibilityHint Example
<TouchableOpacity
...
accessibilityHint="Opens in a new window"
accessibilityRole="link"
>
Check symptoms
</TouchableOpacity>
@liamgriffin
liamgriffin / accessibilityState.jsx
Created May 18, 2021 15:41
Creating Accessible React Native Apps | accessibilityState Example
<TouchableOpacity
accessibilityRole="button"
accessibilityState={disabled: true}
...
>
Submit code
</TouchableOpacity>
@liamgriffin
liamgriffin / accessibilityLabel-example.jsx
Created May 18, 2021 15:40
Creating Accessible React Native Apps | accessibilityLabel Example
<TouchableOpacity
accessibilityLabel="Close"
accessibilityRole="button"
...
>
<!-- Icon... -->
</TouchableOpacity>
@liamgriffin
liamgriffin / react-native-material-ripple.jsx
Created May 18, 2021 14:34
Creating Accessible React Native Apps | React Native Material Ripple
if (Platform.OS === 'android') {
return (
<Ripple onPress={onPressHandler} ...>
{content}
</Ripple>
);
}
return (
<TouchableOpacity onPress={onPressHandler} ...>
{content}
@liamgriffin
liamgriffin / rawRequest.js
Created April 30, 2021 13:19
Implementing API Rate Limits
await graphQLClient.rawRequest(productUpdateMutation, productInput).then(({ errors, data, extensions, headers, status })) => {
console.log(JSON.stringify(data, undefined, 2))
console.log(`There are ${extensions.cost.throttleStatus.currentlyAvailable} rate limit points available/n`)
}
@liamgriffin
liamgriffin / final-then-clause.js
Created April 30, 2021 13:17
Implementing API Rate Limits
then(({ errors, data, extensions, headers, status })) => {
console.log(JSON.stringify(data, undefined, 2))
console.log(`There are ${extensions.cost.throttleStatus.currentlyAvailable} rate limit points available/n`)
}
@liamgriffin
liamgriffin / customer-account-links.liquid
Created October 30, 2020 08:26
How to Personalize Shopify Themes with the customer Object | Customer account links
@liamgriffin
liamgriffin / cart-continue-link.liquid
Created July 22, 2020 13:26
How to Use the Routes and Page_Image Liquid Objects | Continue Link Liquid
@liamgriffin
liamgriffin / cart-continue-link.html
Created July 22, 2020 13:26
How to Use the Routes and Page_Image Liquid Objects | Continue Link
@liamgriffin
liamgriffin / cart-form.liquid
Created July 22, 2020 13:24
How to Use the Routes and Page_Image Liquid Objects | Form Liquid
<form action="{{ routes.cart_url }}" method="post" novalidate class="cart">
<table>
</table>
</form>