Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Yang committed Dec 9, 2018
1 parent f51ee1c commit 86f73e5
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,25 @@ class Display extends Component {

### Props

| Key | Type | Default | Description |
| ------------ | ------------------ | --------- | ------------------------------------------------------------------------------------------------------ |
| background | string | '#000000' | Hex or rgb() string for the display's background |
| borderColor | string | '#dddddd' | Hex or rgb() string for the color of the border between characters |
| borderWidth | string | '1px' | Any valid CSS width value for the width of the border between characters |
| characterSet | [string](required) | _null_ | The array of characters for the display to flip through |
| fontSize | string | '1em' | Any valid CSS font-size value |
| minLength | number | _null_ | Minimum # of characters in the display |
| padDirection | string | 'left' | If minLength > number of characters currently displayed, append blank characters to left or right side |
| step | number | 200 | Sets the speed (ms) of flips |
| textColor | string | '#dddddd' | Hex or rgb() string for color of the display characters |
| value | string (required) | _null_ | The string of characters to display or flip to |
| Key | Type | Default | Description |
| -------------- | --------------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
| background | string | '#000000' | Hex or rgb() string for the display's background |
| borderColor | string | '#dddddd' | Hex or rgb() string for the color of the border between characters |
| borderWidth | string | '1px' | Any valid CSS width value for the width of the border between characters |
| characterSet | Array of strings (required) | _null_ | The array of characters for the display to flip through |
| characterWidth | string | _null_ | Any valid CSS width value for the width of each character. Useful with non-monospaced fonts |
| fontSize | string | '1em' | Any valid CSS font-size value |
| minLength | number | _null_ | Minimum # of characters in the display |
| padDirection | string | 'left' | If minLength > number of characters currently displayed, append blank characters to left or right side |
| step | number | 200 | Sets the speed (ms) of flips |
| textColor | string | '#dddddd' | Hex or rgb() string for color of the display characters |
| value | string (required) | _null_ | The string of characters to display or flip to |

For `characterSet`, there are three convenience constants that ship with this component:

`SplitFlapDisplay.NUMERIC`: [0-9]
`SplitFlapDisplay.ALPHA`: whitespace ' ' + [A-Z]
`SplitFlapDisplay.PUNCTUATION`: the non-alphanumeric characters found in a (Vesta Board)[https://www.vestaboard.com/ces/]
`SplitFlapDisplay.NUMERIC`: [0-9]
`SplitFlapDisplay.ALPHA`: whitespace ' ' + [A-Z]
`SplitFlapDisplay.PUNCTUATION`: the non-alphanumeric characters found in a [Vesta Board](https://www.vestaboard.com/ces/)

## License

Expand Down

0 comments on commit 86f73e5

Please sign in to comment.