Skip to content

Commit

Permalink
Fixed prop type of caption from string to node to allow rendering Rea…
Browse files Browse the repository at this point in the history
…ct components.

Replace flow.sh with buildCI.sh.
  • Loading branch information
Henrik Hermansen committed Oct 12, 2017
1 parent 0e077a1 commit 5f3267f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 47 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## v4.9.1

* Added support for sorting on potentially undefined values in columns
* Fixed prop type of `caption` from `string` to `node` to allow rendering React components.
This was always intended based on `README.md`.
* Replace `flow.sh` with `buildCI.sh`.
* Added support for sorting on potentially undefined values in columns.

## v4.9.0

Expand Down
17 changes: 17 additions & 0 deletions buildCI.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e

main() {
npm install
npm test
npm run build

if should_publish; then
npm run has-published -s || npm publish
fi
}

function should_publish() {
[[ $GIT_BRANCH =~ ^(origin/)?master$ ]]
}

main "$@"
2 changes: 1 addition & 1 deletion examples/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ render(
expandedContentMapper={ lazyExpandedContentMapper }
condensed={true}
smallHeader={true}
caption="This table even has caption!"
caption={ <span>This table even has caption!<br/><span className="ffe-small-text">Which can even be a component</span></span> }
sortable={true}
/>

Expand Down
42 changes: 0 additions & 42 deletions flow.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/SortableTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class SortableTable extends Component {
}

SortableTable.propTypes = {
caption: PropTypes.string,
caption: PropTypes.node,
srOnlyCaption: PropTypes.bool,
expandedContentMapper: PropTypes.func,
offset: PropTypes.number,
Expand Down
2 changes: 1 addition & 1 deletion src/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Table extends Component {
Table.propTypes = {
alignLeft: PropTypes.bool,
columnLayoutMobile: PropTypes.bool,
caption: PropTypes.string,
caption: PropTypes.node,
srOnlyCaption: PropTypes.bool,
expandedContentMapper: PropTypes.func,
condensed: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Table(props) {
}

Table.propTypes = {
caption: PropTypes.string,
caption: PropTypes.node,
srOnlyCaption: PropTypes.bool,
expandedContentMapper: PropTypes.func,
sortable: PropTypes.bool,
Expand Down

0 comments on commit 5f3267f

Please sign in to comment.