@teambit/base-ui.text.paragraph
Advanced tools
Comparing version 0.5.4 to 0.5.5
@@ -13,8 +13,2 @@ import React from 'react'; | ||
} & React.HTMLAttributes<HTMLParagraphElement>; | ||
/** | ||
* Paragraph component prototype. Accepts all properties of a native Paragraph element, | ||
* @name paragraph | ||
* @example | ||
* <Paragraph size="sm">This is some text</Paragraph> | ||
*/ | ||
export declare function Paragraph({ className, size, element: Element, ...rest }: ParagraphProps): JSX.Element; | ||
@@ -21,0 +15,0 @@ export declare namespace Paragraph { |
@@ -21,8 +21,2 @@ "use strict"; | ||
const paragraph_module_scss_1 = __importDefault(require("./paragraph.module.scss")); | ||
/** | ||
* Paragraph component prototype. Accepts all properties of a native Paragraph element, | ||
* @name paragraph | ||
* @example | ||
* <Paragraph size="sm">This is some text</Paragraph> | ||
*/ | ||
function Paragraph(_a) { | ||
@@ -29,0 +23,0 @@ var { className, size, element: Element } = _a, rest = __rest(_a, ["className", "size", "element"]); |
@@ -9,16 +9,24 @@ "use strict"; | ||
const chai_1 = require("chai"); | ||
const paragraph_1 = require("./paragraph"); | ||
const base_ui_theme_sizes_1 = require("@teambit/base-ui.theme.sizes"); | ||
it('should render', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_1.Paragraph, null, "test text")); | ||
const rendered = getByText('test text'); | ||
const paragraph_composition_1 = require("./paragraph.composition"); | ||
it('should render p element', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_composition_1.Pelement, null)); | ||
const rendered = getByText('p element'); | ||
chai_1.expect(rendered).to.exist; | ||
}); | ||
it('should render with different size', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_1.Paragraph, { size: base_ui_theme_sizes_1.PossibleSizes.xl }, "test text")); | ||
const rendered = getByText('test text'); | ||
// cannot test classnames with Mocha | ||
// expect(rendered.className).to.include('xs'); | ||
it('should render p element with different size', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_composition_1.PelementWithDifferentSize, null)); | ||
const rendered = getByText('p element with xl size'); | ||
chai_1.expect(rendered.className).to.include('xl'); | ||
chai_1.expect(rendered).to.exist; | ||
}); | ||
it('should render div element', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_composition_1.DivElement, null)); | ||
const rendered = getByText('div element'); | ||
chai_1.expect(rendered).to.exist; | ||
}); | ||
it('should render span element', () => { | ||
const { getByText } = react_2.render(react_1.default.createElement(paragraph_composition_1.SpanElement, null)); | ||
const rendered = getByText('span element'); | ||
chai_1.expect(rendered).to.exist; | ||
}); | ||
//# sourceMappingURL=paragraph.spec.js.map |
{ | ||
"name": "@teambit/base-ui.text.paragraph", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"homepage": "https://bit.dev/teambit/base-ui/text/paragraph", | ||
@@ -9,8 +9,7 @@ "main": "dist/index.js", | ||
"name": "text/paragraph", | ||
"version": "0.5.4" | ||
"version": "0.5.5" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.2.6", | ||
"@babel/runtime": "^7.8.4", | ||
"@teambit/base-ui.theme.sizes": "0.5.4" | ||
"@teambit/base-ui.theme.sizes": "0.5.5" | ||
}, | ||
@@ -24,4 +23,6 @@ "devDependencies": { | ||
"@types/react": "16.9.43", | ||
"@babel/runtime": "^7.11.2", | ||
"core-js": "^3.6.5", | ||
"@types/node": "^12.12.27" | ||
"@types/node": "^12.12.27", | ||
"@teambit/base-ui.theme.theme-provider": "0.5.5" | ||
}, | ||
@@ -38,3 +39,2 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@babel/runtime": "^7.8.4", | ||
"react": "-" | ||
@@ -47,2 +47,3 @@ }, | ||
"@types/react": "16.9.43", | ||
"@babel/runtime": "^7.11.2", | ||
"core-js": "^3.6.5", | ||
@@ -49,0 +50,0 @@ "@types/node": "^12.12.27" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14937
4
23
245
0
10
+ Added@teambit/base-ui.theme.sizes@0.5.5(transitive)
- Removed@babel/runtime@^7.8.4
- Removed@babel/runtime@7.26.9(transitive)
- Removed@teambit/base-ui.theme.sizes@0.5.4(transitive)
- Removedregenerator-runtime@0.14.1(transitive)