This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRouter } from 'next/router' | |
import { useState, useEffect } from 'react' | |
const Page = () => { | |
const router = useRouter() | |
const [results, setResults] = useState(false) | |
const [query, setQuery] = useState() | |
// react to query parameter changes | |
useEffect(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react' | |
import { useQuery } from 'lib/use-query' | |
const CalendarListing = () => { | |
const [loading, setLoading] = useState(true) | |
const [queryParams, setQueryParams] = useState({}) | |
const [events, setEvents] = useState([]) | |
const getEvents = async () => { | |
const urlParams = new URLSearchParams(window.location.search) | |
const params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
// Point at your stories | |
stories: ['../components/**/*.stories.js'], | |
addons: [ | |
'@storybook/addon-links', | |
'@storybook/addon-essentials', | |
// Handle SCSS modules | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import textBalancer from 'text-balancer'; | |
textBalancer.intialize(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="balance-text"> | |
this is a long<br data-owner="balance-text"><strong>headline with | |
<br data-owner="balance-text">lots</strong> of <a href="https://google.com">lorem copy</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
AFRAME.registerComponent("trigger-listener", { | |
init: function () { | |
var el = this.el; | |
el.addEventListener("triggerdown", function (evt) { | |
document.getElementById("ball").emit("throw"); | |
}); | |
}, | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
AFRAME.registerComponent("trigger-listener", { | |
init: function () { | |
var el = this.el; | |
el.addEventListener("triggerdown", function (evt) { | |
document.getElementById("ball").emit("throw"); | |
}); | |
}, | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a-sphere | |
animation="property: position; to: 0 0.9144 0; dur: 375;" | |
id="ball" | |
radius="0.0365" | |
color="white" | |
position="0 2.34 -18.4404"> | |
</a-sphere> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a-entity | |
id="secondaryHand" | |
oculus-touch-controls="hand: left"> | |
</a-entity> | |
<a-entity | |
id="primaryHand" | |
oculus-touch-controls="hand: right"> | |
</a-entity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a-sphere | |
radius="0.0365" | |
color="white" | |
position="0 2.34 -18.4404"> | |
</a-sphere> |
NewerOlder