Skip to content

Commit

Permalink
chore: convert bullseye example to function component example
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Apr 2, 2024
1 parent b4c97be commit afb8e55
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions src/layouts/bullseye/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,15 @@ use crate::{example, example::ExamplePage};
use patternfly_yew::prelude::*;
use yew::prelude::*;

pub struct BullseyeExample {}
#[function_component(BullseyeExample)]
pub fn bullseye_example() -> Html {
let example1 = example! ("Bullseye" => "bullseye.1.example");

impl Component for BullseyeExample {
type Message = ();
type Properties = ();

fn create(_: &Context<Self>) -> Self {
Self {}
}

fn view(&self, _: &Context<Self>) -> Html {
let example1 = example! ("Bullseye" => "bullseye.1.example");

html! {
<>
<ExamplePage title="Bullseye Layout">
{example1}
</ExamplePage>
</>
}
html! {
<>
<ExamplePage title="Bullseye Layout">
{example1}
</ExamplePage>
</>
}
}

0 comments on commit afb8e55

Please sign in to comment.