Skip to content

Commit

Permalink
doc(readme): props
Browse files Browse the repository at this point in the history
  • Loading branch information
pvoznyuk committed Jun 1, 2017
1 parent 4d556af commit 4d99393
Show file tree
Hide file tree
Showing 9 changed files with 8,671 additions and 16,616 deletions.
1 change: 0 additions & 1 deletion .npmignore
@@ -1,7 +1,6 @@
/.*/
/.*
/reports/
/src/example/
/src/.*
/test/
/test-e2e/
Expand Down
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -50,6 +50,18 @@ Outputs:

you can use any formatting from [node-dateformat](https://github.com/felixge/node-dateformat) date library

### Properties

| Propertie | Type | Default Value | Description |
|------------|---------------------|---------------|-------------|
| `date` | timestamp or string | currrent date | Date to output, If nothing is set then it take current date. |
| `format` | string | 'HH:MM' | Formatting from [node-dateformat](https://github.com/felixge/node-dateformat) library.
| `locale` | string | 'en_US' | Locale to translate formatted date to.
| `timezone` | string | null | If timezone is set, the date is show in this timezone. You can find the list. [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), the TZ column.
| `ticking` | boolean | false | If you want the clock to be auto-updated every `inteval` seconds.
| `interval` | integer | 1000 | Auto-updating period for the clock. 1 second is a default value.
| `className`| string | null | Extra class.
| `children` | string | null | `date` can be set as a children prop.

## Development and testing

Expand Down
25,145 changes: 8,590 additions & 16,555 deletions build/react-live-clock.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/react-live-clock.js.map

Large diffs are not rendered by default.

53 changes: 39 additions & 14 deletions build/react-live-clock.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/react-live-clock.min.js.map

Large diffs are not rendered by default.

65 changes: 23 additions & 42 deletions lib/Component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/example/App/index.js
Expand Up @@ -21,7 +21,10 @@ const App = () =>
<ReactLiveClock date={'1997-12-31T14:15:23+01:00'} format={'dddd, mmmm dS, yyyy, h:MM:ss TT'} />

<h4>The same date in timezone US/Pacific</h4>
<ReactLiveClock date={'1997-12-31T14:15:23+01:00'} format={'dddd, mmmm dS, yyyy, h:MM:ss TT'} timezone={'US/Pacific'} />
<ReactLiveClock
date={'1997-12-31T14:15:23+01:00'}
format={'dddd, mmmm dS, yyyy, h:MM:ss TT'}
timezone={'US/Pacific'} />

</div>;

Expand Down

0 comments on commit 4d99393

Please sign in to comment.