Skip to content

Commit

Permalink
perf(ink): New Ink version
Browse files Browse the repository at this point in the history
Updates ink to the latest version and replaces deprecated components
  • Loading branch information
maticzav committed May 15, 2018
2 parents 4610ea0 + 1e01935 commit e12aa8b
Show file tree
Hide file tree
Showing 6 changed files with 5,792 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ render(<Basic/>)
#### header `({children}) => h`
> A component used as header cell. Value is passed as `children` prop.
_(Recommend using `<Text/>` with `chalk` props.)_
_(Recommend using `<Color/>` with `chalk` props.)_
#### cell `({children}) => h`
> A component used as regular cell. Value is passed as `children` prop.
_(Recommend using `<Text/>` with `chalk` props.)_
_(Recommend using `<Color/>` with `chalk` props.)_
#### skeleton `({children}) => h`
> A component used as skeleton (lines and crosses ...). Value is passed as `children` prop.
_(Recommend using `<Text/>` with `chalk` props.)_
_(Recommend using `<Color/>` with `chalk` props.)_

## License
Expand Down
8 changes: 4 additions & 4 deletions examples/custom.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import {h, render, Text} from 'ink'
import {h, render, Color} from 'ink'
import PropTypes from 'prop-types'

import Table from '..'

// Components ----------------------------------------------------------------

const CustomHeader = ({children}) => <Text red italic>{children}</Text>
const CustomHeader = ({children}) => <Color red italic>{children}</Color>
CustomHeader.propTypes = {
children: PropTypes.any.isRequired
}

const CustomCell = ({children}) => <Text white bold>{children}</Text>
const CustomCell = ({children}) => <Color white bold>{children}</Color>
CustomCell.propTypes = {
children: PropTypes.any.isRequired
}

const CustomSkeleton = ({children}) => <Text green>{children}</Text>
const CustomSkeleton = ({children}) => <Color green>{children}</Color>
CustomSkeleton.propTypes = {
children: PropTypes.any.isRequired
}
Expand Down
Loading

0 comments on commit e12aa8b

Please sign in to comment.