Commit 713b01f06481ca81d7010c0fc836efdc718aca76
add example style export from about.js
mix irving authored on 12/20/2016, 5:52:57 AMMichael Williams committed on 12/23/2016, 7:27:15 AM
Parent: 108d820b09fd85d159865f851eac43f82f21766f
Files changed
modules_basic/about.js | changed |
modules_basic/about.js | ||
---|---|---|
@@ -5,12 +5,26 @@ | ||
5 | 5 … | exports.needs = { |
6 | 6 … | blob_url: 'first' |
7 | 7 … | } |
8 | 8 … | |
9 | -exports.gives = 'message_content' | |
9 … | +exports.gives = { | |
10 … | + 'mcss': true, | |
11 … | + 'message_content': true | |
12 … | +} | |
10 | 13 … | |
14 … | +var style = ` | |
15 … | + About { | |
16 … | + background-color: red | |
17 … | + } | |
18 … | +` | |
19 … | + | |
11 | 20 … | exports.create = function (api) { |
12 | - return function (msg) { | |
21 … | + return { | |
22 … | + message_content, | |
23 … | + mcss: style | |
24 … | + } | |
25 … | + | |
26 … | + function message_content (msg) { | |
13 | 27 … | if(msg.value.content.type !== 'about') return |
14 | 28 … | |
15 | 29 … | var about = msg.value.content |
16 | 30 … | var { about: aboutId, name, image, description } = about |
Built with git-ssb-web