-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: format * chore(typings): add typing for `remoteTabSessionKey` * chore(typings): replace deprecated `RefForwardingComponent` with `ForwardRefRenderFunction` * fix(typings): improve `fileColl` types * feat!: add `Panel` component BREAKING CHANGE: `Panel` component was undocumented but still exported. It's API and behaviour have changed. See README for the details. * fix(typing): jquery reference * chore: update dummy example * chore: refactor typing test * chore: do not call `onChange` on file add * chore: fix typings * chore: cancel group loading after value updated * chore: fix test * chore: wrap dialog api * chore: refactor DialogApi typings
- Loading branch information
Showing
12 changed files
with
328 additions
and
123 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
import React from 'react' | ||
import React, { useRef } from 'react' | ||
|
||
import { Panel } from '../src' | ||
|
||
export default () => <Panel publicKey='demopublickey' /> | ||
export default () => { | ||
const ref = useRef() | ||
|
||
return ( | ||
<Panel | ||
ref={ref} | ||
value={[ | ||
'cced07ed-50f4-49fa-b37f-8a40b5754dff', | ||
'https://ucarecdn.com/fdfe4e67-f747-4993-91f5-be21d6d3c1a6/-/preview/760x500/-/progressive/yes/-/format/auto/-/quality/normal/', | ||
'9ef9af26-7356-4428-b69c-1b920f947989~2' | ||
]} | ||
multiple | ||
publicKey="demopublickey" | ||
onTabChange={(e) => console.log('onTabChange', e)} | ||
onProgress={(progress) => console.log('onProgress', progress)} | ||
onChange={(files) => { | ||
Promise.allSettled(files).then((results) => | ||
console.log('onChange', results) | ||
) | ||
}} | ||
/> | ||
) | ||
} |
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
Oops, something went wrong.