leptos_element_plus 0.0.3

A wrapper of element-plus for leptos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use leptos::*;
use leptos_meta::{Script,Style};

use include_flate::flate;

flate!(pub static JS_STR: str from "js_dist/index.js");
flate!(pub static CSS_STR: str from "js_dist/index.css");

/// Add this component to your app to initialize element-plus
#[component]
pub fn ElementPlusSetup() -> impl IntoView {
    let js_str: &str = &JS_STR;
    let css_str: &str = &CSS_STR;
    view! {
        <Script type_="module">{js_str}</Script>
        <Style>{css_str}</Style>
    }
}