terra-alert
Advanced tools
Comparing version 4.42.0 to 4.43.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 4.43.0 - (October 13, 2020) | ||
* Changed | ||
* Fixed text alignment at ultrawide browser widths | ||
## 4.42.0 - (September 16, 2020) | ||
@@ -7,0 +12,0 @@ |
@@ -12,8 +12,10 @@ "use strict"; | ||
var _terraButton = _interopRequireDefault(require("terra-button")); | ||
var _terraShowHide = _interopRequireDefault(require("terra-show-hide")); | ||
var _terraToggle = _interopRequireDefault(require("terra-toggle")); | ||
var _terraAlert = _interopRequireDefault(require("terra-alert")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _LongTextExampleModule = _interopRequireDefault(require("./LongTextExample.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -37,20 +39,22 @@ | ||
var cx = _bind.default.bind(_LongTextExampleModule.default); | ||
var LongTextExample = function LongTextExample() { | ||
var _useState = (0, _react.useState)(false), | ||
_useState2 = _slicedToArray(_useState, 2), | ||
showAll = _useState2[0], | ||
setShowAll = _useState2[1]; | ||
isOpen = _useState2[0], | ||
setIsOpen = _useState2[1]; | ||
var previewText = 'Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.'; | ||
return /*#__PURE__*/_react.default.createElement(_terraAlert.default, { | ||
type: "info", | ||
title: "Gettysburg Address:" | ||
}, /*#__PURE__*/_react.default.createElement("span", null, "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.", /*#__PURE__*/_react.default.createElement(_terraButton.default, { | ||
variant: "de-emphasis", | ||
onClick: function onClick() { | ||
setShowAll(!showAll); | ||
}, /*#__PURE__*/_react.default.createElement(_terraShowHide.default, { | ||
preview: previewText, | ||
isOpen: isOpen, | ||
onChange: function onChange() { | ||
setIsOpen(!isOpen); | ||
}, | ||
text: showAll ? 'Less Details' : 'More Details' | ||
}), /*#__PURE__*/_react.default.createElement(_terraToggle.default, { | ||
isOpen: showAll | ||
}, /*#__PURE__*/_react.default.createElement("p", null, "Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this."), /*#__PURE__*/_react.default.createElement("p", null, "But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.")))); | ||
className: cx('long-text-example') | ||
}, /*#__PURE__*/_react.default.createElement("p", null, previewText), /*#__PURE__*/_react.default.createElement("p", null, "Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this."), /*#__PURE__*/_react.default.createElement("p", null, "But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth."))); | ||
}; | ||
@@ -57,0 +61,0 @@ |
{ | ||
"name": "terra-alert", | ||
"main": "lib/Alert.js", | ||
"version": "4.42.0", | ||
"version": "4.43.0", | ||
"description": "The Terra Alert component is a notification banner that can be rendered in your application when there is information that you want to bring to the user's attention. The Alert component supports a number of built-in notification types that render with pre-defined colors and icons that help the user understand the severity and meaning of the notification. A custom notification type is also supported that allows your application to customize an alert that may not fit into the pre-defined types.", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
"terra-icon": "^3.36.0", | ||
"terra-responsive-element": "^5.23.0", | ||
"terra-responsive-element": "^5.24.0", | ||
"terra-theme-context": "^1.0.0", | ||
@@ -52,3 +52,3 @@ "terra-toggle": "^3.38.0" | ||
}, | ||
"gitHead": "997e7704bffd5770f39b9edf4bd0b1a24ef68965" | ||
"gitHead": "cd745760fb83c896a7ec888ac873e8c47553eeec" | ||
} |
import React, { useState } from 'react'; | ||
import Button from 'terra-button'; | ||
import Toggle from 'terra-toggle'; | ||
import ShowHide from 'terra-show-hide'; | ||
import Alert from 'terra-alert'; | ||
import classNames from 'classnames/bind'; | ||
import styles from './LongTextExample.module.scss'; | ||
const cx = classNames.bind(styles); | ||
const LongTextExample = () => { | ||
const [showAll, setShowAll] = useState(false); | ||
const [isOpen, setIsOpen] = useState(false); | ||
const previewText = 'Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.'; | ||
return ( | ||
<Alert type="info" title="Gettysburg Address:"> | ||
<span> | ||
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. | ||
<Button | ||
variant="de-emphasis" | ||
onClick={() => { | ||
setShowAll(!showAll); | ||
}} | ||
text={showAll ? 'Less Details' : 'More Details'} | ||
/> | ||
<Toggle isOpen={showAll}> | ||
<p> | ||
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. | ||
</p> | ||
<p> | ||
But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth. | ||
</p> | ||
</Toggle> | ||
</span> | ||
<ShowHide | ||
preview={previewText} | ||
isOpen={isOpen} | ||
onChange={() => { | ||
setIsOpen(!isOpen); | ||
}} | ||
className={cx('long-text-example')} | ||
> | ||
<p>{previewText}</p> | ||
<p> | ||
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. | ||
</p> | ||
<p> | ||
But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth. | ||
</p> | ||
</ShowHide> | ||
</Alert> | ||
@@ -30,0 +33,0 @@ ); |
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
161864
93
1824