@guardian/src-inline-error
Advanced tools
| import { css, jsx } from '@emotion/core'; | ||
| import React from 'react'; | ||
| import { space } from '@guardian/src-foundations'; | ||
| import { inlineErrorLight } from '@guardian/src-foundations/themes'; | ||
| export { inlineErrorBrand, inlineErrorLight } from '@guardian/src-foundations/themes'; | ||
| import { textSans } from '@guardian/src-foundations/typography'; | ||
| var inlineError = function inlineError() { | ||
| var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : inlineErrorLight, | ||
| inlineError = _ref.inlineError; | ||
| return ( | ||
| /*#__PURE__*/ | ||
| css("display:flex;align-items:center;", textSans.medium(), ";color:", inlineError.text, ";margin-bottom:", space[1], "px;svg{fill:currentColor;width:30px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVK0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL2NvcmVcIlxuaW1wb3J0IHsgc3BhY2UgfSBmcm9tIFwiQGd1YXJkaWFuL3NyYy1mb3VuZGF0aW9uc1wiXG5pbXBvcnQge1xuXHRpbmxpbmVFcnJvckxpZ2h0LFxuXHRJbmxpbmVFcnJvclRoZW1lLFxufSBmcm9tIFwiQGd1YXJkaWFuL3NyYy1mb3VuZGF0aW9ucy90aGVtZXNcIlxuaW1wb3J0IHsgdGV4dFNhbnMgfSBmcm9tIFwiQGd1YXJkaWFuL3NyYy1mb3VuZGF0aW9ucy90eXBvZ3JhcGh5XCJcblxuZXhwb3J0IGNvbnN0IGlubGluZUVycm9yID0gKHtcblx0aW5saW5lRXJyb3IsXG59OiB7IGlubGluZUVycm9yOiBJbmxpbmVFcnJvclRoZW1lIH0gPSBpbmxpbmVFcnJvckxpZ2h0KSA9PiBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdCR7dGV4dFNhbnMubWVkaXVtKCl9O1xuXHRjb2xvcjogJHtpbmxpbmVFcnJvci50ZXh0fTtcblx0bWFyZ2luLWJvdHRvbTogJHtzcGFjZVsxXX1weDtcblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0XHR3aWR0aDogMzBweDtcblx0fVxuYFxuIl19 */")) | ||
| ); | ||
| }; | ||
| var SvgAlert = function SvgAlert() { | ||
| return React.createElement("svg", { | ||
| viewBox: "0 0 30 30", | ||
| xmlns: "http://www.w3.org/2000/svg" | ||
| }, React.createElement("path", { | ||
| fillRule: "evenodd", | ||
| clipRule: "evenodd", | ||
| d: "M14.41 5L4 22.057l.668.943h20.664l.668-.943L15.59 5h-1.18zm-.063 12.178h1.306l.621-6.917-.856-.728h-.835l-.857.728.62 6.917zM15 18.452c.7 0 1.274.573 1.274 1.274 0 .7-.573 1.274-1.274 1.274-.7 0-1.274-.573-1.274-1.274 0-.7.573-1.274 1.274-1.274z" | ||
| })); | ||
| }; | ||
| var InlineError = function InlineError(_ref) { | ||
| var children = _ref.children; | ||
| return jsx("span", { | ||
| css: function css(theme) { | ||
| return inlineError(theme.inlineError && theme); | ||
| } | ||
| }, jsx(SvgAlert, null), children); | ||
| }; | ||
| export { InlineError }; |
+14
| # Inline Error | ||
| ## Install | ||
| ```sh | ||
| $ yarn add @guardian/src-inline-error @guardian/src-foundations | ||
| ``` | ||
| ## Supported themes | ||
| ### Standard | ||
| - `default` | ||
| - `brand` |
+5
-4
| { | ||
| "name": "@guardian/src-inline-error", | ||
| "version": "0.7.0", | ||
| "version": "0.13.0", | ||
| "main": "dist/inline-error.js", | ||
@@ -17,3 +17,3 @@ "module": "dist/inline-error.esm.js", | ||
| "@emotion/babel-preset-css-prop": "^10.0.14", | ||
| "@guardian/src-foundations": "^0.12.0", | ||
| "@guardian/src-foundations": "^0.13.0", | ||
| "@guardian/src-helpers": "^0.0.1", | ||
@@ -26,2 +26,3 @@ "rollup": "^1.17.0", | ||
| "files": [ | ||
| "dist/*.js", | ||
| "index.tsx", | ||
@@ -32,8 +33,8 @@ "styles.ts" | ||
| "@emotion/core": "^10.0.14", | ||
| "@guardian/src-foundations": "^0.12.0", | ||
| "@guardian/src-foundations": "^0.13.0", | ||
| "react": "^16.8.6" | ||
| }, | ||
| "dependencies": { | ||
| "@guardian/src-svgs": "^0.1.0" | ||
| "@guardian/src-svgs": "^0.13.0" | ||
| } | ||
| } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
7430
56.06%6
50%122
43.53%1
-50%15
Infinity%4
33.33%+ Added
+ Added
- Removed
- Removed
Updated