Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrankland committed Mar 26, 2016
1 parent 350990b commit e3d32cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import amphtml from 'react-amphtml';
var amphtml = require('react-amphtml').default;
```

### `amphtml(*component-name*, *callback*)`
Returns a React component of the requested `*component-name*`.
### `amphtml('component-name', callback)`
Returns a React component of the requested `'component-name'`.

#### `*component-name*`
Pass the name of the amphtml component without the `amp-` prefix. Throws exception if it doesn't exist.
Ex: `facebook`, `font`, `list`, `img`
#### `'component-name'`
Pass a string of the name of the amphtml component without the `amp-` prefix. Throws exception if it doesn't exist.
Ex: `'facebook'`, `'font'`, `'list'`, `'img'`

#### `*callback*`
#### `callback`
Function that will be called with an argument passed containing an object of the amphtml component name and script URL.
Will only be called if the component is an extension, not a builtin.
Ex:
Expand Down

0 comments on commit e3d32cb

Please sign in to comment.