0.0.7 • Published 5 years ago

react-first-matching-node v0.0.7

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

react-first-matching-node

Manager

Props

PropTypeDescription
nameStringnamespace for the Manager. Targets will register themselves against this namespace.
activeBooleanWhen this is true, the Manager will run a check to find the first Target and fire the registered callback for that Target.
idsString[]Which Target IDs should be considered when checking for the first target

Target

Props

PropTypeDescription
idStringID for the target. Needs to be unique
childrenFunctionA function that returns a React node. It is passed a single parameter of type TargetNodeProps, which are the props that should be spread onto your target HTML node, for example your containing div.
onMatchFunctionA function that is called when this target is the first matching node. It is called with a reference to the DOM node that TargetNodeProps were applied to
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

6 years ago