2018-04-26 05:20:55 +03:00
|
|
|
<!doctype html>
|
|
|
|
<!--
|
|
|
|
@license
|
|
|
|
Copyright 2018 Google Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>snackbar demo</title>
|
2018-05-07 23:17:46 +03:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2018-05-01 04:10:36 +03:00
|
|
|
<script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
|
2018-04-26 05:20:55 +03:00
|
|
|
<script type="module" src="../node_modules/@material/mwc-snackbar/mwc-snackbar.js"></script>
|
|
|
|
<script type="module" src="../node_modules/@material/mwc-button/mwc-button.js"></script>
|
2019-03-13 20:23:56 +03:00
|
|
|
<script type="module" src="../node_modules/@material/mwc-icon-button/mwc-icon-button.js"></script>
|
2018-04-26 05:20:55 +03:00
|
|
|
<script type="module" src="../node_modules/@material/mwc-icon/mwc-icon.js"></script>
|
|
|
|
<link rel="stylesheet" href="demo-component.css">
|
|
|
|
</head>
|
|
|
|
<body class="unresolved">
|
|
|
|
<header>
|
2018-05-07 23:17:46 +03:00
|
|
|
<a href="index.html"><mwc-icon>arrow_back</mwc-icon>
|
2018-04-26 05:20:55 +03:00
|
|
|
<span>Snackbar</span></a>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
<div class="demo-group">
|
2019-03-13 20:23:56 +03:00
|
|
|
<mwc-button id="snack1" raised ripple label="DEFAULT"></mwc-button>
|
|
|
|
<mwc-button id="snack2" raised ripple label="LEADING"></mwc-button>
|
|
|
|
<mwc-button id="snack3" raised ripple label="STACKED"></mwc-button>
|
2018-04-26 05:20:55 +03:00
|
|
|
</div>
|
|
|
|
|
2019-03-13 20:23:56 +03:00
|
|
|
<mwc-snackbar id="snack" labelText="Can't send photo. Retry in 5 seconds.">
|
|
|
|
<mwc-button id="actionButton" slot="action">RETRY</mwc-button>
|
|
|
|
<mwc-icon-button id="iconButton" icon="close" slot="dismiss"></mwc-icon-button>
|
|
|
|
</mwc-snackbar>
|
2018-04-26 05:20:55 +03:00
|
|
|
|
|
|
|
</main>
|
2019-03-13 20:23:56 +03:00
|
|
|
<script>
|
2018-04-26 05:20:55 +03:00
|
|
|
snack1.onclick = () => {
|
2019-03-13 20:23:56 +03:00
|
|
|
snack.stacked = false;
|
|
|
|
snack.leading = false;
|
|
|
|
snack.open();
|
2018-04-26 05:20:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
snack2.onclick = () => {
|
2019-03-13 20:23:56 +03:00
|
|
|
snack.stacked = false;
|
|
|
|
snack.leading = true;
|
|
|
|
snack.open();
|
2018-04-26 05:20:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
snack3.onclick = () => {
|
2019-03-13 20:23:56 +03:00
|
|
|
snack.stacked = true;
|
|
|
|
snack.leading = false;
|
|
|
|
snack.open();
|
2018-04-26 05:20:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
addEventListener('load', () => document.body.classList.remove('unresolved'));
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|