-
Notifications
You must be signed in to change notification settings - Fork 1
Drawer story and additions #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3c897bb
added Drawer.stories.svelte
hobbitronics 225acd1
added a theme for stories
hobbitronics 67be437
Merge branch 'develop' into feature/Drawer-story
hobbitronics 0ca417e
removed TopAppBar from Drawer
hobbitronics dd1f25e
moved to Atoms, unused code, added an icon
hobbitronics 6c7169d
missing list and core-styles per README
hobbitronics 722c5cc
imported _index.scss for sample theme
hobbitronics 19313ed
added TopAppBar in if block and props.
hobbitronics 462441e
added body to Drawer story
hobbitronics e292a40
npm i after merging develop
hobbitronics 73d46f8
removed toggle
hobbitronics 423d125
added toggle prop and reactive statements
hobbitronics 667743a
added dismissible story and buttons, modlecule
hobbitronics c76c0eb
used global classes
hobbitronics 0455449
set modal to false by default
hobbitronics 33b5127
no need to set modal to false when dismissible
hobbitronics 7805aed
check dismissible before turning modal off
hobbitronics 7dd8c32
updated README and CHANGELOG
hobbitronics 1cac5c2
removed colors and add a color from theme
hobbitronics 94cc4f2
typo in CHANGELOG
hobbitronics File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| @use "@material/drawer"; | ||
| @use "@material/list"; | ||
|
|
||
| @include drawer.core-styles; | ||
| @include drawer.dismissible-core-styles; | ||
| @include drawer.modal-core-styles; | ||
| @include list.core-styles; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| <script> | ||
| import { Meta, Template, Story } from "@storybook/addon-svelte-csf" | ||
| import { Drawer, Button } from "../components/mdc" | ||
| import { copyAndModifyArgs } from "./helpers.js" | ||
|
|
||
| const args = { | ||
| class: '', //only works for global classes | ||
| title: 'Title', | ||
| toggle: true, | ||
| menuItems: [ | ||
| {}, | ||
| { | ||
| url: './', | ||
| icon: 'account_circle', | ||
| label: 'see our components in storybook' | ||
| }, | ||
| { | ||
| label: '--break--', | ||
| }, | ||
| { | ||
| url: './', | ||
| label: 'see our components in storybook' | ||
| }, | ||
| { | ||
| url: './', | ||
| label: 'see our components in storybook' | ||
| }, | ||
| { | ||
| label: '--break--', | ||
| }, | ||
| { | ||
| url: './', | ||
| label: 'see our components in storybook' | ||
| } | ||
| ] | ||
| } | ||
| </script> | ||
|
|
||
| <Meta | ||
| title="Molecule/Drawer" | ||
| component={Drawer} | ||
| /> | ||
|
|
||
| <Template let:args> | ||
| <body> | ||
| <Drawer {...args}> | ||
| <span class="pointer" slot="header"> | ||
| <img class="w-100" src="/logo.png" alt="logo"> | ||
| <Button on:click={() => args.toggle = !args.toggle}>Toggle drawer</Button> | ||
| </span> | ||
|
|
||
| <Button on:click={() => args.toggle = !args.toggle}>Toggle drawer</Button> | ||
|
|
||
| </Drawer> | ||
| </body> | ||
| </Template> | ||
|
|
||
| <Story | ||
| name="Default" | ||
| {args} | ||
| /> | ||
|
|
||
| <Story | ||
| name="Subtitle" | ||
| args={copyAndModifyArgs(args, {subtitle: 'subtitle'})} | ||
| /> | ||
|
|
||
| <Story | ||
| name="Dismissible" | ||
| args={copyAndModifyArgs(args, {dismissible: true})} | ||
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @use './theme'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // https://material.io/develop/web/docs/theming | ||
|
|
||
| :root { | ||
| --mdc-theme-primary: #00A7E1; | ||
| --mdc-theme-primary-variant: #0078AF; | ||
| --mdc-theme-secondary: #FF4800; | ||
| --mdc-theme-error: #C30000; | ||
| --progress-bar-color: #005CB9; | ||
| } | ||
|
|
||
| .mdc-theme--primary-variant { | ||
| color: var(--mdc-theme-primary-variant); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does$: toggle, toggleDrawer() work the same as $ : toggle && toggleDrawer() ? At one point I thought so, but I haven't been able to get it to work recently.