This file contains hidden or 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 * as React from 'react'; | |
const { default: TinyGesture } = require('tinygesture'); | |
export function useCarousel(itemsLength: number) { | |
const [state, setState] = React.useState({ currentIndex: 0, translateValue: 0 }); | |
const carouselRef = React.useRef<HTMLDivElement>(null); | |
React.useEffect(() => { | |
const gesture = new TinyGesture(carouselRef.current); |
This file contains hidden or 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 vscode = require('vscode'); | |
const shelljs = require('shelljs'); | |
// This extension is a hack to explore a possible VsCode way to search | |
// for a directory name. | |
// | |
// In IntelliJ you can search for a directory by ending the search string with '/'. | |
// In Vim, you can `:call fzf#run({'source': 'fd -t d', 'sink': 'NERDTreeFind'})` | |
// | |
// But VsCode doesn't seem to provide an API to open the current |