|
| 1 | +<AutoAdjust {bottomAppBar}> |
| 2 | + <h5>Standard</h5> |
| 3 | + |
| 4 | + <div> |
| 5 | + <FormField> |
| 6 | + <Checkbox bind:checked={withFab} /> |
| 7 | + <span slot="label">With FAB</span> |
| 8 | + </FormField> |
| 9 | + </div> |
| 10 | + |
| 11 | + <Button on:click={() => snackbar.open()}> |
| 12 | + <Label>Open Snackbar</Label> |
| 13 | + </Button> |
| 14 | + |
| 15 | + <Snackbar bind:this={snackbar}> |
| 16 | + <Label>This is a snackbar.</Label> |
| 17 | + <Actions> |
| 18 | + <IconButton class="material-icons" title="Dismiss">close</IconButton> |
| 19 | + </Actions> |
| 20 | + </Snackbar> |
| 21 | + |
| 22 | + <LoremIpsum /> |
| 23 | + <img |
| 24 | + alt="Page content placeholder" |
| 25 | + src="/page-content.jpg" |
| 26 | + style="display: block; max-width: 100%; height: auto; margin: 1em auto;" |
| 27 | + /> |
| 28 | +</AutoAdjust> |
| 29 | + |
| 30 | +<BottomAppBar bind:this={bottomAppBar}> |
| 31 | + <Section> |
| 32 | + <IconButton class="material-icons">menu</IconButton> |
| 33 | + </Section> |
| 34 | + {#if withFab} |
| 35 | + <Section fabInset> |
| 36 | + <Fab aria-label="New item"> |
| 37 | + <Icon class="material-icons">add</Icon> |
| 38 | + </Fab> |
| 39 | + </Section> |
| 40 | + {/if} |
| 41 | + <Section> |
| 42 | + <IconButton class="material-icons" aria-label="Search">search</IconButton> |
| 43 | + <IconButton class="material-icons" aria-label="More">more_vert</IconButton> |
| 44 | + </Section> |
| 45 | +</BottomAppBar> |
| 46 | + |
| 47 | +<script lang="ts"> |
| 48 | + import BottomAppBar, { |
| 49 | + Section, |
| 50 | + AutoAdjust, |
| 51 | + } from '@smui-extra/bottom-app-bar'; |
| 52 | + import Snackbar, { Actions, Label } from '@smui/snackbar'; |
| 53 | + import Button from '@smui/button'; |
| 54 | + import IconButton from '@smui/icon-button'; |
| 55 | + import Fab, { Icon } from '@smui/fab'; |
| 56 | + import Checkbox from '@smui/checkbox'; |
| 57 | + import FormField from '@smui/form-field'; |
| 58 | + import LoremIpsum from '$lib/LoremIpsum.svelte'; |
| 59 | +
|
| 60 | + let bottomAppBar: BottomAppBar; |
| 61 | + let snackbar: Snackbar; |
| 62 | + let withFab = false; |
| 63 | +</script> |
| 64 | + |
| 65 | +<style> |
| 66 | + /* Hide everything above this component. */ |
| 67 | + :global(#smui-app), |
| 68 | + :global(body), |
| 69 | + :global(html) { |
| 70 | + display: block !important; |
| 71 | + height: auto !important; |
| 72 | + width: auto !important; |
| 73 | + position: static !important; |
| 74 | + } |
| 75 | +</style> |
0 commit comments