mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 14:29:22 -05:00
29 lines
375 B
Markdown
29 lines
375 B
Markdown
|
# Usage
|
||
|
|
||
|
You just need to import thaw and use it.
|
||
|
|
||
|
```rust
|
||
|
// Import all
|
||
|
use thaw::*;
|
||
|
// Import on Demand
|
||
|
use thaw::{Button, ButtonVariant};
|
||
|
```
|
||
|
|
||
|
A small example:
|
||
|
|
||
|
```rust
|
||
|
use leptos::*;
|
||
|
use thaw::*;
|
||
|
|
||
|
fn main() {
|
||
|
mount_to_body(App);
|
||
|
}
|
||
|
|
||
|
#[component]
|
||
|
pub fn App() -> impl IntoView {
|
||
|
view! {
|
||
|
<Button variant=ButtonVariant::Primary>"Primary"</Button>
|
||
|
}
|
||
|
}
|
||
|
```
|