> sanity documents get document-id | pbcopy
First make sure to define your editor using EDITOR=code (for vscode).
> sanity documents create --id documentId --watch --replace
| // Type definitions for react-table 7 | |
| // Project: https://github.com/tannerlinsley/react-table#readme | |
| // Definitions by: Grsmto <https://github.com/grsmto> | |
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
| // TypeScript Version: 3.0 | |
| declare module 'react-table' { | |
| export type Cell = { | |
| render: (type: string) => any; | |
| getCellProps: () => any; | |
| column: Column; |
| import React from "react" | |
| export default function useIsDragged(ref, offset = 5) { | |
| const isDragged = React.useRef(false) | |
| const isDown = React.useRef(false) | |
| const distance = React.useRef(0) | |
| const mousePos = React.useRef({ | |
| x: 0, | |
| y: 0, | |
| }) |
| // Simple implementation of https://github.com/sanity-io/sanity/blob/21af6baffe88d57db32d0a05e048ef7d3d671523/packages/%40sanity/form-builder/src/inputs/ArrayInput/ArrayFunctions.tsx | |
| import React from "react"; | |
| import DropDownButton from "part:@sanity/components/buttons/dropdown"; | |
| import Button from "part:@sanity/components/buttons/default"; | |
| import ButtonGrid from "part:@sanity/components/buttons/button-grid"; | |
| import styles from "./styles/ArrayInput.css"; | |
| export default class ArrayFunctions extends React.Component { | |
| handleDropDownAction = (menuItem) => { |