@tds/core-text
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.0.1](https://github.com/telusdigital/tds/compare/@tds/core-text@2.0.0...@tds/core-text@2.0.1) (2019-08-01) | ||
### Bug Fixes | ||
* **core-text:** replace sass with SC in TextSup ([becfe34](https://github.com/telusdigital/tds/commit/becfe34)) | ||
# [2.0.0](https://github.com/telusdigital/tds/compare/@tds/core-text@1.1.0...@tds/core-text@2.0.0) (2019-07-10) | ||
@@ -8,0 +19,0 @@ |
@@ -85,4 +85,2 @@ 'use strict'; | ||
var styles = {"wordBreak":"TDS_Typography-modules__wordBreak___3OZx_","baseSupSubScripts":"TDS_Typography-modules__baseSupSubScripts___WeebJ","sup":"TDS_Typography-modules__sup___3IauS TDS_Typography-modules__baseSupSubScripts___WeebJ","default":"TDS_Typography-modules__default___KlcpP","base":"TDS_Typography-modules__base___2nkPE TDS_Typography-modules__wordBreak___3OZx_","baseFont":"TDS_Typography-modules__baseFont___2Cfk4","small":"TDS_Typography-modules__small___mt5lS TDS_Typography-modules__wordBreak___3OZx_","smallFont":"TDS_Typography-modules__smallFont___3S6nz","medium":"TDS_Typography-modules__medium___1rxfE TDS_Typography-modules__wordBreak___3OZx_","mediumFont":"TDS_Typography-modules__mediumFont___XMrRj","large":"TDS_Typography-modules__large___24W-w TDS_Typography-modules__wordBreak___3OZx_","largeFont":"TDS_Typography-modules__largeFont___3k7bm TDS_Typography-modules__wordBreak___3OZx_","boldFont":"TDS_Typography-modules__boldFont___2YS3O TDS_Typography-modules__wordBreak___3OZx_","color":"TDS_Typography-modules__color___2CNH8","invertedColor":"TDS_Typography-modules__invertedColor___2tTa_","inheritColor":"TDS_Typography-modules__inheritColor___SREX0","blockText":"TDS_Typography-modules__blockText___2Gy51"}; | ||
/* eslint-disable import/prefer-default-export */ | ||
@@ -97,2 +95,6 @@ var deprecate = function deprecate(componentName, message) { | ||
var StyledTextSup = styled.sup.withConfig({ | ||
displayName: "TextSup__StyledTextSup", | ||
componentId: "sc-1jkhnsx-0" | ||
})(typography.sup); | ||
/** | ||
@@ -109,5 +111,3 @@ * @deprecated Superscript text an as HTML `<sup>` element. | ||
deprecate('@tds/core-text', 'The Text.Sup component is deprecated. Please use a standard HTML sup element instead.'); | ||
return React.createElement("sup", _extends_1({}, safeRest(rest), { | ||
className: styles.sup | ||
}), children); | ||
return React.createElement(StyledTextSup, safeRest(rest), children); | ||
}; | ||
@@ -114,0 +114,0 @@ |
@@ -80,4 +80,2 @@ import React from 'react'; | ||
var styles = {"wordBreak":"TDS_Typography-modules__wordBreak___3OZx_","baseSupSubScripts":"TDS_Typography-modules__baseSupSubScripts___WeebJ","sup":"TDS_Typography-modules__sup___3IauS TDS_Typography-modules__baseSupSubScripts___WeebJ","default":"TDS_Typography-modules__default___KlcpP","base":"TDS_Typography-modules__base___2nkPE TDS_Typography-modules__wordBreak___3OZx_","baseFont":"TDS_Typography-modules__baseFont___2Cfk4","small":"TDS_Typography-modules__small___mt5lS TDS_Typography-modules__wordBreak___3OZx_","smallFont":"TDS_Typography-modules__smallFont___3S6nz","medium":"TDS_Typography-modules__medium___1rxfE TDS_Typography-modules__wordBreak___3OZx_","mediumFont":"TDS_Typography-modules__mediumFont___XMrRj","large":"TDS_Typography-modules__large___24W-w TDS_Typography-modules__wordBreak___3OZx_","largeFont":"TDS_Typography-modules__largeFont___3k7bm TDS_Typography-modules__wordBreak___3OZx_","boldFont":"TDS_Typography-modules__boldFont___2YS3O TDS_Typography-modules__wordBreak___3OZx_","color":"TDS_Typography-modules__color___2CNH8","invertedColor":"TDS_Typography-modules__invertedColor___2tTa_","inheritColor":"TDS_Typography-modules__inheritColor___SREX0","blockText":"TDS_Typography-modules__blockText___2Gy51"}; | ||
/* eslint-disable import/prefer-default-export */ | ||
@@ -92,2 +90,6 @@ var deprecate = function deprecate(componentName, message) { | ||
var StyledTextSup = styled.sup.withConfig({ | ||
displayName: "TextSup__StyledTextSup", | ||
componentId: "sc-1jkhnsx-0" | ||
})(sup); | ||
/** | ||
@@ -104,5 +106,3 @@ * @deprecated Superscript text an as HTML `<sup>` element. | ||
deprecate('@tds/core-text', 'The Text.Sup component is deprecated. Please use a standard HTML sup element instead.'); | ||
return React.createElement("sup", _extends_1({}, safeRest(rest), { | ||
className: styles.sup | ||
}), children); | ||
return React.createElement(StyledTextSup, safeRest(rest), children); | ||
}; | ||
@@ -109,0 +109,0 @@ |
{ | ||
"name": "@tds/core-text", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Inline text", | ||
@@ -29,6 +29,6 @@ "main": "index.cjs.js", | ||
"dependencies": { | ||
"@tds/shared-typography": "^1.3.0", | ||
"@tds/shared-typography": "^1.3.1", | ||
"prop-types": "^15.5.10" | ||
}, | ||
"gitHead": "f1ab6393021cd5c38d9f5c45aa2f373556756246" | ||
"gitHead": "584cb652519a1676af6b022d25dc545963d7689b" | ||
} |
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import { shallow, mount } from 'enzyme' | ||
@@ -8,5 +8,6 @@ import TextSup from '../TextSup' | ||
const doShallow = props => shallow(<TextSup {...props}>Some content</TextSup>) | ||
const doMount = props => mount(<TextSup {...props}>Some content</TextSup>) | ||
it('renders', () => { | ||
const textSup = doShallow() | ||
const textSup = doMount() | ||
@@ -17,5 +18,5 @@ expect(textSup).toMatchSnapshot() | ||
it('renders an HTML sub tag', () => { | ||
const textSup = doShallow() | ||
const textSup = doMount() | ||
expect(textSup).toHaveDisplayName('sup') | ||
expect(textSup.find('StyledComponent').childAt(0)).toHaveDisplayName('sup') | ||
}) | ||
@@ -22,0 +23,0 @@ |
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import styles from '@tds/shared-typography/Typography.modules.scss' | ||
import styled from 'styled-components' | ||
import { sup } from '@tds/shared-typography' | ||
import { deprecate } from '../../../shared/utils/warn' | ||
import safeRest from '../../../shared/utils/safeRest' | ||
const StyledTextSup = styled.sup(sup) | ||
/** | ||
@@ -19,7 +23,3 @@ * @deprecated Superscript text an as HTML `<sup>` element. | ||
) | ||
return ( | ||
<sup {...safeRest(rest)} className={styles.sup}> | ||
{children} | ||
</sup> | ||
) | ||
return <StyledTextSup {...safeRest(rest)}>{children}</StyledTextSup> | ||
} | ||
@@ -26,0 +26,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24195
17
501