-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
161 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist | ||
target | ||
|
||
# Editor directories and files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ rand = "0.8.5" | |
|
||
[lints.clippy] | ||
pedantic = "warn" | ||
module-name-repetitions = "allow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[serve] | ||
address = "127.0.0.1" | ||
port = 8080 | ||
open = false | ||
no_autoreload = false | ||
|
||
[watch] | ||
watch = ["index.html", "src"] | ||
ignore = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use leptos::{component, view, Children, IntoView}; | ||
|
||
#[component] | ||
pub fn Button(children: Children) -> impl IntoView { | ||
view! { | ||
<button class="rounded px-4 py-1 | ||
bg-purple-500 hover:bg-purple-600 transition | ||
cursor-pointer select-none">{children()}</button> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use leptos::{component, view, Children, IntoView, MaybeProp}; | ||
|
||
#[component] | ||
pub fn Circle( | ||
children: Children, | ||
#[prop(optional, into)] class: MaybeProp<String>, | ||
) -> impl IntoView { | ||
let class = move || { | ||
[ | ||
"rounded-full flex items-center justify-center".to_owned(), | ||
class().unwrap_or_default(), | ||
] | ||
.join(" ") | ||
}; | ||
|
||
view! { <div class=class>{children()}</div> } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** @type { import('tailwindcss').Config } */ | ||
|
||
module.exports = { | ||
content: { | ||
files: ["src/**/*.rs"], | ||
}, | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |