Policy 1707 commit to LF
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / CSS / bootstrap / docs / _includes / components / alerts.html
1 <div class="bs-docs-section">
2   <h1 id="alerts" class="page-header">Alerts</h1>
3
4   <p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.</p>
5
6   <h2 id="alerts-examples">Examples</h2>
7   <p>Wrap any text and an optional dismiss button in <code>.alert</code> and one of the four contextual classes (e.g., <code>.alert-success</code>) for basic alert messages.</p>
8
9   <div class="bs-callout bs-callout-info" id="callout-alerts-no-default">
10     <h4>No default class</h4>
11     <p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
12   </div>
13
14   <div class="bs-example" data-example-id="simple-alerts">
15     <div class="alert alert-success" role="alert">
16       <strong>Well done!</strong> You successfully read this important alert message.
17     </div>
18     <div class="alert alert-info" role="alert">
19       <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
20     </div>
21     <div class="alert alert-warning" role="alert">
22       <strong>Warning!</strong> Better check yourself, you're not looking too good.
23     </div>
24     <div class="alert alert-danger" role="alert">
25       <strong>Oh snap!</strong> Change a few things up and try submitting again.
26     </div>
27   </div>
28 {% highlight html %}
29 <div class="alert alert-success" role="alert">...</div>
30 <div class="alert alert-info" role="alert">...</div>
31 <div class="alert alert-warning" role="alert">...</div>
32 <div class="alert alert-danger" role="alert">...</div>
33 {% endhighlight %}
34
35   <h2 id="alerts-dismissible">Dismissible alerts</h2>
36   <p>Build on any alert by adding an optional <code>.alert-dismissible</code> and close button.</p>
37   <div class="bs-callout bs-callout-info" id="callout-alerts-dismiss-plugin">
38     <h4>Requires JavaScript alert plugin</h4>
39     <p>For fully functioning, dismissible alerts, you must use the <a href="../javascript/#alerts">alerts JavaScript plugin</a>.</p>
40   </div>
41   <div class="bs-example" data-example-id="dismissible-alert-css">
42     <div class="alert alert-warning alert-dismissible" role="alert">
43       <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
44       <strong>Warning!</strong> Better check yourself, you're not looking too good.
45     </div>
46   </div>
47 {% highlight html %}
48 <div class="alert alert-warning alert-dismissible" role="alert">
49   <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
50   <strong>Warning!</strong> Better check yourself, you're not looking too good.
51 </div>
52 {% endhighlight %}
53
54   <div class="bs-callout bs-callout-warning" id="callout-alerts-dismiss-use-button">
55     <h4>Ensure proper behavior across all devices</h4>
56     <p>Be sure to use the <code>&lt;button&gt;</code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
57   </div>
58
59   <h2 id="alerts-links">Links in alerts</h2>
60   <p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
61   <div class="bs-example" data-example-id="alerts-with-links">
62     <div class="alert alert-success" role="alert">
63       <strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
64     </div>
65     <div class="alert alert-info" role="alert">
66       <strong>Heads up!</strong> This <a href="#" class="alert-link">alert needs your attention</a>, but it's not super important.
67     </div>
68     <div class="alert alert-warning" role="alert">
69       <strong>Warning!</strong> Better check yourself, you're <a href="#" class="alert-link">not looking too good</a>.
70     </div>
71     <div class="alert alert-danger" role="alert">
72       <strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
73     </div>
74   </div>
75 {% highlight html %}
76 <div class="alert alert-success" role="alert">
77   <a href="#" class="alert-link">...</a>
78 </div>
79 <div class="alert alert-info" role="alert">
80   <a href="#" class="alert-link">...</a>
81 </div>
82 <div class="alert alert-warning" role="alert">
83   <a href="#" class="alert-link">...</a>
84 </div>
85 <div class="alert alert-danger" role="alert">
86   <a href="#" class="alert-link">...</a>
87 </div>
88 {% endhighlight %}
89 </div>