Changeset View
Changeset View
Standalone View
Standalone View
web/flow-typed/npm/focus-trap-react_vx.x.x.js
- This file was added.
// flow-typed signature: 29231f6b72f5876f5692b592dce3c754 | |||||
// flow-typed version: <<STUB>>/focus-trap-react_v10.1.4/flow_v0.182.0 | |||||
/** | |||||
* This is an autogenerated libdef stub for: | |||||
* | |||||
* 'focus-trap-react' | |||||
* | |||||
* Fill this stub out by replacing all the `any` types. | |||||
* | |||||
* Once filled out, we encourage you to share your work with the | |||||
* community by sending a pull request to: | |||||
* https://github.com/flowtype/flow-typed | |||||
*/ | |||||
declare module 'focus-trap-react' { | |||||
import type { Node } from 'react'; | |||||
declare type FocusTrapOptions = { | |||||
kuba: Not sure if also need to add if we don't use it.
Here are TypeScript types for that:
https… | |||||
michalUnsubmitted Not Done Inline ActionsAfter looking through I think most of them should be pretty easy to add here and we might want to customize the behaviour a bit in the future. I don't think we will be using the bare focus-trap lib so it's probably fine to add them here (also I think flow has some problems with imports between libdefs?). michal: After looking through I think most of them should be pretty easy to add here and we might want… | |||||
} | |||||
declare type FocusTrapProps = { | |||||
+children?: Node, | |||||
+active?: boolean, | |||||
+paused?: boolean, | |||||
+focusTrapOptions?: FocusTrapOptions, | |||||
+containerElements?: $ReadOnlyArray<HTMLElement>, | |||||
}; | |||||
kubaAuthorUnsubmitted Done Inline ActionsHere are TypeScript types of that: kuba: Here are `TypeScript` types of that:
https://github.com/focus-trap/focus-trap… | |||||
declare module.exports: FocusTrapProps => Node; | |||||
} |
Not sure if also need to add if we don't use it.
Here are TypeScript types for that:
https://github.com/focus-trap/focus-trap/blob/1dabbb3b45714aff2b17d750c7238a6a844dfe72/index.d.ts#L28
Should I add it? And if so, probably it should be in the focus-trap types, not focus-trap-react.