-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba2592f
commit 11ca6ac
Showing
10 changed files
with
241 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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,61 @@ | ||
import { html } from 'lit-html'; | ||
import { withKnobs, text, boolean, number } from "@storybook/addon-knobs"; | ||
import { withCssResources } from '@storybook/addon-cssresources'; | ||
|
||
import '../src/sakai-course-card.js'; | ||
|
||
export default { | ||
title: 'Sakai Course Card', | ||
decorators: [withCssResources, withKnobs], | ||
parameters: { | ||
cssresources: [ | ||
{ | ||
id: `smalltheme`, | ||
code: ` | ||
<style> | ||
body { | ||
--sakai-course-card-font-face: arial; | ||
--sakai-course-card-width: 180px; | ||
--sakai-course-card-title-font-size: 12px; | ||
--sakai-course-card-code-font-size: 10px; | ||
--sakai-course-card-background-color: red; | ||
--sakai-course-card-title-color: green; | ||
--sakai-options-menu-invoker-color: white; | ||
--sakai-icon-favourite-color: green; | ||
--sakai-course-card-tool-alerts-height: 20px; | ||
--sakai-course-card-border-color: black; | ||
} | ||
</style>`, | ||
picked: false, | ||
}, | ||
{ | ||
id: `bigtheme`, | ||
code: ` | ||
<style> | ||
body { | ||
--sakai-course-card-font-face: arial; | ||
--sakai-course-card-width: 480px; | ||
--sakai-course-card-title-font-size: 40px; | ||
--sakai-course-card-code-font-size: 30px; | ||
--sakai-course-card-background-color: blue; | ||
--sakai-course-card-title-color: white; | ||
--sakai-course-card-border-radius: 10px; | ||
--sakai-options-menu-invoker-color: green; | ||
--sakai-icon-alert-color: green; | ||
--sakai-icon-favourite-color: red; | ||
--sakai-course-card-tool-alerts-height: 40px; | ||
--sakai-course-card-border-color: black; | ||
} | ||
</style>`, | ||
picked: false, | ||
} | ||
], | ||
}, | ||
}; | ||
|
||
export const BasicDisplay = () => { | ||
|
||
return html` | ||
<sakai-course-card course-title="${text('course-title', 'Physical Ocean')}" course-code="${text('course-code', 'Evolutionary Biology')}" /> | ||
`; | ||
}; |
This file contains 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,35 @@ | ||
import { html } from 'lit-html'; | ||
import { withKnobs, text, boolean, number, select } from "@storybook/addon-knobs"; | ||
|
||
import '../src/sakai-icon.js'; | ||
|
||
export default { | ||
title: 'Sakai Icon', | ||
decorators: [withKnobs] | ||
}; | ||
|
||
let sizes = ["small", "medium", "large"]; | ||
|
||
export const Alerts = () => html` | ||
<sakai-icon type="alert" size="${select('size', sizes, 'small')}" /> | ||
`; | ||
|
||
export const Assignments = () => html` | ||
<sakai-icon type="assignments" size="${select('size', sizes, 'small')}" ?has-alerts="${boolean('has-alerts', false)}"/> | ||
`; | ||
|
||
export const Favourite = () => html` | ||
<sakai-icon type="favourite" size="${select('size', sizes, 'medium')}" /> | ||
`; | ||
|
||
export const Gradebook = () => html` | ||
<sakai-icon type="gradebook" size="${select('size', sizes, 'small')}" /> | ||
`; | ||
|
||
export const Forums = () => html` | ||
<sakai-icon type="forums" size="${select('size', sizes, 'small')}" /> | ||
`; | ||
|
||
export const Menu = () => html` | ||
<sakai-icon type="menu" size="${select('size', sizes, 'small')}" /> | ||
`; |
This file contains 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,21 @@ | ||
import { html } from 'lit-html'; | ||
import { withKnobs, text, boolean, number } from "@storybook/addon-knobs"; | ||
|
||
import '../src/sakai-options-menu.js'; | ||
|
||
export default { | ||
title: 'Sakai Options Menu', | ||
decorators: [withKnobs] | ||
}; | ||
|
||
export const BasicDisplay = () => html` | ||
<sakai-options-menu placement="${text('placement', 'right')}"> | ||
<div slot="content"> | ||
<div>Select some fruit options!</div> | ||
<div><input type="checkbox" />Bananas</div> | ||
<div><input type="checkbox" />Apples</div> | ||
<div><input type="checkbox" />Orange</div> | ||
</div> | ||
</sakai-options-menu> | ||
`; |