Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const TagFallbacks = () => (
<div>
{alertText}
<h3 id="fallbacks">Tag with no onClick or href</h3>
} text="Icon & Text - No OnClick/HREF Tag" />
</div>
);
const alertEndTagStr = '';
return (
<div>
<div dir="ltr">
<h3>Alert of type info with custom title and long text with show more/less</h3>
<br>
<code>
{alertStartTagStr}
<br>
{alertContentStr}
<br>
{alertEndTagStr}
</code>
</div>
<br>
<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 style="{buttonStyle}">
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.
<br><br>
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.
<br><br>
</button><button style="{buttonStyle}">
</button></span></div>
);
<br>
} >
{alertText}
<br>
<p>Action button has been clicked {this.state.actionButtonClickCount} times.</p>
<br><br><br>
<div dir="ltr">
<h3>Basic Alert of type info in a small container (500px wide) which should be rendered the same as in wide container</h3>
<br>
<code>
{alert2StartTagStr}{alert2Text}{alert2EndTagStr}
</code>
</div>
<br>
{alert2Text}
);
}
}
render() {
const alertStartTagStr = '} >';
const alertEndTagStr = '';
const alertText = 'This is a a custom alert with no icon or title. It is configured to be dismissible and with a custom action button. Click on the Dismiss button to dismiss the alert.';
let alertElem = '';
if (!this.state.isDismissed) {
alertElem = (
} >
{alertText}
);
}
return (
<div>
<div dir="ltr">
<h3>Alert of type custom with no icon or title that is dismissible and has an action button</h3>
<br>
<code>
{alertStartTagStr}
<br>
{alertText}
<br>
{alertEndTagStr}
</code></div></div>
return (
<div style="{{">
<div dir="ltr">
<h3>Basic Alert of type warning with action button in a small container (500px wide) that will cause the action button section of the alert
to render below the message instead of beside it.</h3>
<br>
<code>
{alertStartTagStr}
<br>
{alertText}.
<br>
{alertEndTagStr}
</code>
</div>
<br>
} >
{alertText}
<br>
<p>Action button has been clicked {this.state.actionButtonClickCount} times.</p>
<br><br><br>
<div dir="ltr">
<h3>Basic Alert of type info in a small container (500px wide) which should be rendered the same as in wide container</h3>
<br>
<code>
{alert2StartTagStr}{alert2Text}{alert2EndTagStr}
</code>
</div>
<br>
{alert2Text}
</div>
);
const alertText = 'This is a warning. It is configured with a custom Action button.';
return (
<div>
<div dir="ltr">
<h3>Basic Alert of type warning with action button</h3>
<br>
<code>
{alertStartTagStr}
<br>
{alertText}.
<br>
{alertEndTagStr}
</code>
</div>
<br>
} >
{alertText}
<br>
<p>Action button has been clicked {this.state.actionButtonClickCount} times.</p>
</div>
);
}
}