feat: mvoe away from compound context
This commit is contained in:
1 parent
bfdcb20437
commit
a2c7d17b05
103 files changed
+309
-293
No files matched your search
@@ -12,7 +12,7 @@ fn main() {
|
||||
)
|
||||
}
|
||||
|
||||
pub static App: FC<()> = |cx| {
|
||||
pub static App: FC<()> = |cx, props|{
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
class: "overflow-hidden"
|
||||
|
||||
@@ -40,8 +40,8 @@ struct ExampleProps {
|
||||
initial_name: String,
|
||||
}
|
||||
|
||||
static Example: FC<ExampleProps> = |cx| {
|
||||
let dispaly_name = use_state(cx, move || cx.initial_name.clone());
|
||||
static Example: FC<ExampleProps> = |cx, props| {
|
||||
let dispaly_name = use_state(cx, move || props.initial_name.clone());
|
||||
|
||||
cx.render(rsx! {
|
||||
div { class: "py-12 px-4 text-center w-full max-w-2xl mx-auto",
|
||||
|
||||
@@ -23,7 +23,7 @@ fn main() {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
pub static App: FC<()> = |cx| {
|
||||
pub static App: FC<()> = |cx, props|{
|
||||
cx.render(rsx!(
|
||||
div { class: "overflow-hidden"
|
||||
link { href:"https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel:"stylesheet" }
|
||||
@@ -38,7 +38,7 @@ pub static App: FC<()> = |cx| {
|
||||
))
|
||||
};
|
||||
|
||||
pub static Header: FC<()> = |cx| {
|
||||
pub static Header: FC<()> = |cx, props|{
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
header { class: "text-gray-400 bg-gray-900 body-font"
|
||||
@@ -64,7 +64,7 @@ pub static Header: FC<()> = |cx| {
|
||||
})
|
||||
};
|
||||
|
||||
pub static Hero: FC<()> = |cx| {
|
||||
pub static Hero: FC<()> = |cx, props|{
|
||||
//
|
||||
cx.render(rsx! {
|
||||
section{ class: "text-gray-400 bg-gray-900 body-font"
|
||||
@@ -102,7 +102,7 @@ pub static Hero: FC<()> = |cx| {
|
||||
}
|
||||
})
|
||||
};
|
||||
pub static Entry: FC<()> = |cx| {
|
||||
pub static Entry: FC<()> = |cx, props|{
|
||||
//
|
||||
cx.render(rsx! {
|
||||
section{ class: "text-gray-400 bg-gray-900 body-font"
|
||||
@@ -115,7 +115,7 @@ pub static Entry: FC<()> = |cx| {
|
||||
})
|
||||
};
|
||||
|
||||
pub static StacksIcon: FC<()> = |cx| {
|
||||
pub static StacksIcon: FC<()> = |cx, props|{
|
||||
cx.render(rsx!(
|
||||
svg {
|
||||
// xmlns: "http://www.w3.org/2000/svg"
|
||||
@@ -130,7 +130,7 @@ pub static StacksIcon: FC<()> = |cx| {
|
||||
}
|
||||
))
|
||||
};
|
||||
pub static RightArrowIcon: FC<()> = |cx| {
|
||||
pub static RightArrowIcon: FC<()> = |cx, props|{
|
||||
cx.render(rsx!(
|
||||
svg {
|
||||
fill: "none"
|
||||
|
||||
Reference in new issue
Block a user