Fix line lengths (#33)

This commit is contained in:
Cecile Tonglet 2020-10-01 07:37:55 +02:00 committed by GitHub
parent 1dff5a6f7e
commit 127fe4d515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 17 deletions

View file

@ -0,0 +1,18 @@
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Compiling yewprint v0.1.0 (/home/cecile/repos/blueprint-rs/yewprint)
Compiling yewprint-doc v0.1.0 (/home/cecile/repos/blueprint-rs/yewprint-doc)
Finished dev [unoptimized + debuginfo] target(s) in 2.40s
:-) [WARN]: origin crate has no README
[INFO]: Installing wasm-bindgen...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: :-) Done in 3.02s
[INFO]: :-) Your wasm pkg is ready to publish at /home/cecile/repos/blueprint-rs/yewprint-doc/../public.
Wasm size: 4480848
Index: enabled, Upload: disabled, Cache: disabled, Cors: enabled, Range: enabled, Sort: enabled, Threads: 3
Auth: disabled, Compression: disabled
https: disabled, Cert: , Cert-Password:
Root: /home/cecile/repos/blueprint-rs/public,
TryFile404:
Address: http://0.0.0.0:8000
======== [2020-10-01 07:25:47] ========

View file

@ -33,6 +33,8 @@ impl Component for Example {
}
fn view(&self) -> Html {
let logs = include_str!("example.log");
html! {
<div>
<Button onclick=self.link.callback(|_| Msg::ToggleCollapse)>
@ -43,21 +45,7 @@ impl Component for Example {
keep_children_mounted=true
>
<pre class="bp3-code-block">
<div>{"[INFO]: Installing wasm-bindgen..."}</div>
<div>{"[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended"}</div>
<div>{"[INFO]: :-) Done in 0.69s"}</div>
<div>{"[INFO]: :-) Your wasm pkg is ready to publish at /home/cecile/repos/blueprint-rs/./static."}</div>
<div>{" Index: enabled, Upload: disabled, Cache: disabled, Cors: enabled, Range: enabled, Sort: enabled, Threads: 3"}</div>
<div>{" Auth: disabled, Compression: disabled"}</div>
<div>{" https: disabled, Cert: , Cert-Password: "}</div>
<div>{" Root: /home/cecile/repos/blueprint-rs,"}</div>
<div>{" TryFile404: "}</div>
<div>{" Address: http://0.0.0.0:8000"}</div>
<div>{" ======== [2020-09-07 20:39:46] ========"}</div>
<div>{"[2020-09-07 20:39:46] - 127.0.0.1 - 200 - GET /"}</div>
<div>{"[2020-09-07 20:39:46] - 127.0.0.1 - 200 - GET /static/blueprint.css"}</div>
<div>{"[2020-09-07 20:39:46] - 127.0.0.1 - 200 - GET /static/wasm.js"}</div>
<div>{"[2020-09-07 20:39:46] - 127.0.0.1 - 200 - GET /static/wasm_bg.wasm"}</div>
{logs}
</pre>
</Collapse>
</div>

View file

@ -30,7 +30,7 @@ pub struct Props {
#[prop_or(16)]
pub icon_size: i32,
#[prop_or_default]
pub onclick: Option<Callback<MouseEvent>>,
pub onclick: Callback<MouseEvent>,
}
impl Component for Icon {
@ -68,7 +68,10 @@ impl Component for Icon {
let icon_string = format!("{:?}", self.props.icon);
html! {
<span class=("bp3-icon", self.props.class.clone(), self.props.intent) onclick?={self.props.onclick.clone()}>
<span
class=("bp3-icon", self.props.class.clone(), self.props.intent)
onclick=self.props.onclick.clone()
>
<svg
fill?={self.props.color.clone()}
data-icon={icon_string.clone()}