@roo-ui/components
Advanced tools
Comparing version
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="0.15.0"></a> | ||
# [0.15.0](https://github.com/hooroo/roo-ui/compare/v0.14.1...v0.15.0) (2018-05-16) | ||
### Features | ||
* Create Paragraph and remove Text.paragraph ([#39](https://github.com/hooroo/roo-ui/issues/39)) ([ae50011](https://github.com/hooroo/roo-ui/commit/ae50011)) | ||
<a name="0.14.1"></a> | ||
@@ -8,0 +19,0 @@ ## [0.14.1](https://github.com/hooroo/roo-ui/compare/v0.14.0...v0.14.1) (2018-05-16) |
@@ -239,2 +239,15 @@ Object.defineProperty(exports, "__esModule", { | ||
var _Paragraph = require('./Paragraph'); | ||
Object.defineProperty(exports, 'Paragraph', { | ||
enumerable: true, | ||
get: function () { | ||
function get() { | ||
return _interopRequireDefault(_Paragraph)['default']; | ||
} | ||
return get; | ||
}() | ||
}); | ||
var _Truncate = require('./Truncate'); | ||
@@ -241,0 +254,0 @@ |
@@ -21,9 +21,2 @@ Object.defineProperty(exports, "__esModule", { | ||
Text.paragraph = Text.withComponent(_cleanTag2['default'].p); | ||
Text.paragraph.defaultProps = { | ||
textStyle: 'text', | ||
m: 0, | ||
mb: 2 | ||
}; | ||
Text.propTypes = Object.assign({}, _styledSystem.textStyle.propTypes, _styledSystem.color.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.fontWeight.propTypes, _styledSystem.letterSpacing.propTypes, _styledSystem.lineHeight.propTypes, _styledSystem.space.propTypes, _styledSystem.textAlign.propTypes); | ||
@@ -30,0 +23,0 @@ |
@@ -21,15 +21,6 @@ var _react = require('react'); | ||
return _react2['default'].createElement( | ||
_react.Fragment, | ||
_2['default'], | ||
null, | ||
_react2['default'].createElement( | ||
_2['default'], | ||
null, | ||
'Generic text.' | ||
), | ||
_react2['default'].createElement( | ||
_2['default'].paragraph, | ||
null, | ||
'A paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget eros malesuada, suscipit turpis id, vehicula lorem. Etiam iaculis mi quis risus mattis posuere. Cras ultricies metus mauris, a dapibus lacus facilisis iaculis.' | ||
) | ||
'Generic text.' | ||
); | ||
}); |
{ | ||
"name": "@roo-ui/components", | ||
"version": "0.14.1", | ||
"version": "0.15.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -19,2 +19,3 @@ export { default as BackgroundImage } from './BackgroundImage'; | ||
export { default as Text } from './Text'; | ||
export { default as Paragraph } from './Paragraph'; | ||
export { default as Truncate } from './Truncate'; |
@@ -17,12 +17,16 @@ # Text | ||
export default ( | ||
<Fragment> | ||
<Text>Generic Text</Text> | ||
<Text.paragraph>Text paragraph</Text.paragraph> | ||
</Fragment> | ||
<Text>Generic Text</Text> | ||
); | ||
``` | ||
``` | ||
## Customization | ||
This component can be customized with [styled-system](https://github.com/jxnblk/styled-system) by passing props for [color](https://github.com/jxnblk/styled-system#color-responsive), [font size](https://github.com/jxnblk/styled-system#fontsize-responsive), [space](https://github.com/jxnblk/styled-system#space-responsive), or [typography](https://github.com/jxnblk/styled-system#typography). | ||
This component can be customized with [styled-system](https://github.com/jxnblk/styled-system) by passing props for | ||
`textStyle`, | ||
`color`, | ||
`fontSize`, | ||
`fontWeight`, | ||
`letterSpacing`, | ||
`lineHeight`, | ||
`space` & | ||
`textAlign` [functions](https://github.com/jxnblk/styled-system#table-of-style-props) |
@@ -25,9 +25,2 @@ import styled from 'styled-components'; | ||
Text.paragraph = Text.withComponent(tag.p); | ||
Text.paragraph.defaultProps = { | ||
textStyle: 'text', | ||
m: 0, | ||
mb: 2, | ||
}; | ||
Text.propTypes = { | ||
@@ -34,0 +27,0 @@ ...textStyle.propTypes, |
@@ -1,2 +0,2 @@ | ||
import React, { Fragment } from 'react'; | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
@@ -11,13 +11,5 @@ import { withDocs } from 'storybook-readme'; | ||
.add('default', () => ( | ||
<Fragment> | ||
<Text> | ||
Generic text. | ||
</Text> | ||
<Text.paragraph> | ||
A paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget eros | ||
malesuada, suscipit turpis id, vehicula lorem. Etiam iaculis mi quis risus | ||
mattis posuere. Cras ultricies metus mauris, a dapibus lacus facilisis | ||
iaculis. | ||
</Text.paragraph> | ||
</Fragment> | ||
<Text> | ||
Generic text. | ||
</Text> | ||
)); |
163260
2.2%204
5.15%3335
2.39%