Skip to content

Commit 180e658

Browse files
sgnyMoOx
authored andcommitted
reason-react-native: Add documentation for Clipboard (#586)
1 parent 0cbaf83 commit 180e658

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
---
22
id: apis/Clipboard
33
title: Clipboard
4-
wip: true
4+
officialDoc: https://facebook.github.io/react-native/docs/clipboard
55
---
66

7+
## Methods
8+
9+
### `getString`
10+
11+
To attempt reading content from the Clipboard; resolves to a `string` if
12+
successful.
13+
714
```reason
8-
[@bs.module "react-native"] [@bs.scope "Clipboard"]
9-
external getString: unit => Js.Promise.t(string) = "";
15+
getString: unit => Js.Promise.t(string)
16+
```
17+
18+
### `setString`
1019

11-
[@bs.module "react-native"] [@bs.scope "Clipboard"]
12-
external setString: string => unit = "";
20+
To copy a `string` to the Clipbard.
1321

22+
```reason
23+
setString: string => unit
1424
```

0 commit comments

Comments
 (0)