()
| 155 | }; |
| 156 | |
| 157 | function Draggable() { |
| 158 | let {dragProps} = useDrag({ |
| 159 | getItems() { |
| 160 | return [ |
| 161 | { |
| 162 | 'text/plain': 'hello world' |
| 163 | } |
| 164 | ]; |
| 165 | }, |
| 166 | getAllowedDropOperations() { |
| 167 | return ['copy']; |
| 168 | } |
| 169 | }); |
| 170 | |
| 171 | let {clipboardProps} = useClipboard({ |
| 172 | getItems() { |
| 173 | return [ |
| 174 | { |
| 175 | 'text/plain': 'hello world' |
| 176 | } |
| 177 | ]; |
| 178 | } |
| 179 | }); |
| 180 | |
| 181 | let ref = React.useRef(null); |
| 182 | let {buttonProps} = useButton({elementType: 'div'}, ref); |
| 183 | |
| 184 | return ( |
| 185 | <FocusRing> |
| 186 | <div |
| 187 | className={style({color: 'gray-900'})} |
| 188 | ref={ref} |
| 189 | {...mergeProps(dragProps, buttonProps, clipboardProps)}> |
| 190 | <span>Drag me</span> |
| 191 | </div> |
| 192 | </FocusRing> |
| 193 | ); |
| 194 | } |
nothing calls this directly
no test coverage detected