Add icons on TransitViewSecretPage.
This commit is contained in:
parent
752b179f9d
commit
9fc0f9347b
|
@ -7,7 +7,7 @@ export class TransitViewSecretPage extends Page {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
makeTile(title, description, onclick) {
|
makeTile(title, description, icon = "code", onclick = _ => {}) {
|
||||||
return makeElement({
|
return makeElement({
|
||||||
tag: "div",
|
tag: "div",
|
||||||
class: ["uk-tile", "uk-tile-default", "uk-tile-primary", "uk-padding-small"],
|
class: ["uk-tile", "uk-tile-default", "uk-tile-primary", "uk-padding-small"],
|
||||||
|
@ -19,7 +19,16 @@ export class TransitViewSecretPage extends Page {
|
||||||
makeElement({
|
makeElement({
|
||||||
tag: "p",
|
tag: "p",
|
||||||
class: "uk-h4",
|
class: "uk-h4",
|
||||||
text: title
|
text: title,
|
||||||
|
children: makeElement({
|
||||||
|
tag: "span",
|
||||||
|
class: ["uk-icon", "uk-margin-small-left"],
|
||||||
|
attributes: {
|
||||||
|
"uk-icon": `icon: ${icon}`,
|
||||||
|
"role": "img",
|
||||||
|
"aria-label": `${title} icon`
|
||||||
|
}
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
makeElement({
|
makeElement({
|
||||||
tag: "span",
|
tag: "span",
|
||||||
|
@ -42,8 +51,8 @@ export class TransitViewSecretPage extends Page {
|
||||||
makeElement({
|
makeElement({
|
||||||
tag: "div",
|
tag: "div",
|
||||||
children: [
|
children: [
|
||||||
this.makeTile("Encrypt", "Encrypt some plaintext or base64 encoded binary."),
|
this.makeTile("Encrypt", "Encrypt some plaintext or base64 encoded binary.", "lock"),
|
||||||
this.makeTile("Decrypt", "Decrypt some cyphertext."),
|
this.makeTile("Decrypt", "Decrypt some cyphertext.", "mail"),
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue