@smart-react-components/ui
Advanced tools
Comparing version 2.0.0-alpha-115 to 2.0.0-alpha-116
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -33,3 +10,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const react_1 = __importDefault(require("react")); | ||
const AlertElement_1 = __importStar(require("../components/Alert/AlertElement")); | ||
const AlertContent_1 = __importDefault(require("../components/Alert/AlertContent")); | ||
const AlertElement_1 = __importDefault(require("../components/Alert/AlertElement")); | ||
const types_1 = require("../types"); | ||
@@ -70,3 +48,3 @@ const Alert = props => { | ||
iconLeft && iconLeft, | ||
react_1.default.createElement(AlertElement_1.Content, null, content), | ||
react_1.default.createElement(AlertContent_1.default, null, content), | ||
iconRight && iconRight)), | ||
@@ -73,0 +51,0 @@ hasIconLeft: !!iconLeft, |
import { StyledProps } from '@smart-react-components/core/styled-props'; | ||
import { PaletteProp, ResponsiveProp, ShapeProp, SizeProp } from '@smart-react-components/core/types'; | ||
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
interface Props extends StyledProps, ResponsiveProp<'alertSize', SizeProp> { | ||
@@ -5,0 +4,0 @@ hasIconLeft: boolean; |
@@ -6,10 +6,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Content = void 0; | ||
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div")); | ||
const styled_components_1 = __importDefault(require("styled-components")); | ||
const css_1 = require("../../util/css"); | ||
exports.Content = styled_components_1.default.div ` | ||
flex: 1 1 auto; | ||
min-width: 1px; | ||
`; | ||
exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIconLeft, hasIconRight }) => ({ | ||
@@ -19,3 +14,3 @@ getAlertSize: (v, t) => ` | ||
${exports.Content} { | ||
.src-alert-content { | ||
padding: ${t.$.size.alert[v].padding.y} ${t.$.size.alert[v].padding.x}; | ||
@@ -34,3 +29,2 @@ | ||
: ''} | ||
} | ||
@@ -84,3 +78,3 @@ `, | ||
${exports.Content} > { | ||
.src-alert-content > { | ||
header, h1, h2, h3, h4, h5, h6, p, hr { | ||
@@ -87,0 +81,0 @@ margin-bottom: ${theme.$.length['3']}; |
{ | ||
"name": "@smart-react-components/ui", | ||
"version": "2.0.0-alpha-115", | ||
"version": "2.0.0-alpha-116", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
401
541642
11264