Skip to content

Commit 9a807a1

Browse files
committed
docs: ✏️ udate docs
1 parent 942af61 commit 9a807a1

File tree

9 files changed

+20
-14
lines changed

9 files changed

+20
-14
lines changed

Diff for: .travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ notifications:
1010
node_js:
1111
- '8'
1212
script:
13-
- npm run test
14-
- npm run build
13+
- yarn test
14+
- yarn build
1515
matrix:
1616
allow_failures: []
1717
fast_finish: true
1818
after_success:
1919
- npx ci-scripts github-post
2020
- npx ci-scripts slack
21-
- npm run semantic-release
21+
- yarn semantic-release
2222
branches:
2323
except:
2424
- /^v\d+\.\d+\.\d+$/

Diff for: docs/en/ActiveSensor.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# `<ActiveSensor>`
22

3-
Render prop that tracks elements active status. Attaches to the root element, or provides a binding, if `bond` prop specified.
3+
[![React Universal Interface](https://img.shields.io/badge/React-Universal%20Interface-green.svg)](https://github.com/streamich/react-universal-interface)
4+
5+
Render prop that tracks some element's active status.
6+
Attaches to the root element, or provides a binding, if `bond` prop specified.
47

58
## Example
69

Diff for: docs/en/BatterySensor.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `<BatterySensor>`
22

3+
[![React Universal Interface](https://img.shields.io/badge/React-Universal%20Interface-green.svg)](https://github.com/streamich/react-universal-interface)
4+
35
Uses [`Navigator.getBattery()`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery) API to track battery level, charging status and time it takes to charge/discharge a battery.
46

57
## Props

Diff for: docs/en/Counter.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `<Counter>`
22

3+
[![React Universal Interface](https://img.shields.io/badge/React-Universal%20Interface-green.svg)](https://github.com/streamich/react-universal-interface)
4+
35
Allows you to keep a state of a counter value. Is similar to [`<Value>`](./Value.md) but its
46
value is cast to `number` and you have an extra `inc(by = 1)` method that will increment your counter.
57

Diff for: docs/en/Dummies.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Dummies
22

33
Dummies are empty *"shell"* components that don't contain the actual implementation.
4-
54
However, those dummies can be used as real React components and they will re-render
65
automatically once they get implemented.
76

@@ -12,5 +11,3 @@ but implement them with real components only later when necessary.
1211
- [`loadable()`](./loadable.md) - dummy that can be loaded using `.load()` method.
1312
- [`lazy()`](./lazy.md) - like `loadable()`, but also loads automatically when rendered for the first time.
1413
- [`delayed()`](./delayed.md) - like `lazy()`, but its loading can be delayed.
15-
- [`viewport()`](./viewport.md) - postpones component's rendering until it is visible
16-
in viewport at least once.

Diff for: docs/en/HoverSensor.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `<HoverSensor>`
22

3+
[![React Universal Interface](https://img.shields.io/badge/React-Universal%20Interface-green.svg)](https://github.com/streamich/react-universal-interface)
4+
35
Render prop that tracks elements hover status. Attaches to the root element, or provides a binding, if `bond` prop specified.
46

57
## Example

Diff for: docs/en/Introduction.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
`libreact` is a collection of most essential React utilities you will probably need in any project.
44

55
[Render prop](#render-props) and [FaCC](#facc) notation is used interchangeably as most `libreact`
6-
components support both interfaces. Also, most render prop components support
7-
[component prop](#component-prop) interface, with the following precedence:
6+
components support both interfaces and implement [*Universal Component Interface*](https://github.com/streamich/react-universal-interface).
7+
Also, most render prop components support [component prop](#component-prop) interface, with the following precedence:
88

99
1. FaCC
1010
2. Render prop

Diff for: src/Audio/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {cloneElement, Children} from 'react';
1+
import * as React from 'react';
22
import {Media} from '../Media';
33

44
export type TAudioEvent = (event, Audio, IAudioState) => void;
@@ -54,8 +54,8 @@ export class Audio extends Media<IAudioProps, IAudioState, Audio> {
5454
const audio = super.render();
5555
const markup = children(this, this.state);
5656

57-
return cloneElement(markup, null, ...[
58-
...Children.toArray(markup.props.children),
57+
return React.cloneElement(markup, null, ...[
58+
...React.Children.toArray(markup.props.children),
5959
audio
6060
]) as any;
6161
}

Diff for: src/Media/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component} from 'react';
1+
import * as React from 'react';
22
import {h} from '../util';
33
import parseTimeRanges from './parseTimeRanges';
44

@@ -64,7 +64,7 @@ export interface IMediaState {
6464
volume?: number;
6565
}
6666

67-
export class Media<P extends IMediaProps<M>, S extends IMediaState, M extends IMedia> extends Component<P, S> implements IMedia {
67+
export class Media<P extends IMediaProps<M>, S extends IMediaState, M extends IMedia> extends React.Component<P, S> implements IMedia {
6868
tag: 'video' | 'audio' = 'video';
6969
props: P;
7070
el: HTMLMediaElement = null;

0 commit comments

Comments
 (0)