Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 78 additions & 78 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub enum Component {
Pagination,
Popover,
Progress,
ProgressStepper,
SearchInput,
SimpleList,
Skeleton,
Expand Down Expand Up @@ -169,6 +170,7 @@ fn switch_app_route(target: AppRoute) -> Html {
Component::Pagination => html! { <components::PaginationExample /> },
Component::Popover => html! { <components::PopoverExample /> },
Component::Progress => html! { <components::ProgressExample /> },
Component::ProgressStepper => html! { <components::ProgressStepperExample /> },
Component::SearchInput => html! { <components::SearchInputExample /> },
Component::SimpleList => html! { <components::SimpleListExample /> },
Component::Skeleton => html! { <components::SkeletonExample /> },
Expand Down Expand Up @@ -430,6 +432,11 @@ fn page(props: &PageProps) -> Html {
<NavRouterItem<AppRoute> to={AppRoute::Component(Component::Progress)}>
{ "Progress" }
</NavRouterItem<AppRoute>>
<NavRouterItem<AppRoute>
to={AppRoute::Component(Component::ProgressStepper)}
>
{ "Progress Stepper" }
</NavRouterItem<AppRoute>>
<NavRouterItem<AppRoute> to={AppRoute::Component(Component::SearchInput)}>
{ "Search Input" }
</NavRouterItem<AppRoute>>
Expand Down
2 changes: 2 additions & 0 deletions src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ mod number_input;
mod pagination;
mod popover;
mod progress;
mod progress_stepper;
mod search_input;
mod simple_list;
mod skeleton;
Expand Down Expand Up @@ -77,6 +78,7 @@ pub use number_input::*;
pub use pagination::*;
pub use popover::*;
pub use progress::*;
pub use progress_stepper::*;
pub use search_input::*;
pub use simple_list::*;
pub use skeleton::*;
Expand Down
40 changes: 40 additions & 0 deletions src/components/progress_stepper/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
use crate::{example, example::ExamplePage};
use patternfly_yew::prelude::*;
use yew::prelude::*;

#[function_component(ProgressStepperExample)]
pub fn progress() -> Html {
let example_1 = example! ("Basic" => "progress_stepper.1.example");
let example_2 = example! ("Basic with descriptions" => "progress_stepper.2.example");
let example_3 = example! ("Vertical, horizontal responsive" => "progress_stepper.3.example");
let example_4 = example! ("Center aligned with descriptions" => "progress_stepper.4.example");
let example_5 = example! ("Center aligned, vertical" => "progress_stepper.5.example");
let example_6 = example! ("Vertical with descriptions" => "progress_stepper.6.example");
let example_7 = example! ("Compact" => "progress_stepper.7.example");
let example_8 = example! ("Compact Vertical" => "progress_stepper.8.example");
let example_9 = example! ("Compact, vertical responsive" => "progress_stepper.9.example");
let example_10 = example! ("Compact, vertical, centered" => "progress_stepper.10.example");
let example_11 = example! ("Compact, centered" => "progress_stepper.11.example");
let example_12 = example! ("Basic with an issue" => "progress_stepper.12.example");
let example_13 = example! ("Basic with a failure" => "progress_stepper.13.example");
let example_14 = example! ("With help text" => "progress_stepper.14.example");

html! {
<ExamplePage title="Progress Stepper">
{ example_1 }
{ example_2 }
{ example_3 }
{ example_4 }
{ example_5 }
{ example_6 }
{ example_7 }
{ example_8 }
{ example_9 }
{ example_10 }
{ example_11 }
{ example_12 }
{ example_13 }
{ example_14 }
</ExamplePage>
}
}
20 changes: 20 additions & 0 deletions src/components/progress_stepper/progress_stepper.1.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
html!(
<ProgressStepper>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.10.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper compact=true vertical=true centered=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.11.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper compact=true centered=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
30 changes: 30 additions & 0 deletions src/components/progress_stepper/progress_stepper.12.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
html!(
<ProgressStepper>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Warning}
>
{"Third Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Fourth Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Pending}
>
{"Fifth Step"}
</ProgressStepperStep>
</ProgressStepper>
)
30 changes: 30 additions & 0 deletions src/components/progress_stepper/progress_stepper.13.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
html!(
<ProgressStepper>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
>
{"Third Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Danger}
is_current=true
>
{"Fourth Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Pending}
>
{"Fifth Step"}
</ProgressStepperStep>
</ProgressStepper>
)
47 changes: 47 additions & 0 deletions src/components/progress_stepper/progress_stepper.14.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
#[component]
fn Example() -> Html {
let first_header = html!({"First step popover"});
let first_body = html!({"Additional info or help text content."});
let first_footer = html!();

let second_header = html!({"Second step popover"});
let second_body = html!({"Additional info or help text content."});
let second_footer = html!();

let third_header = html!({"Third step popover"});
let third_body = html!({"Additional info or help text content."});
let third_footer = html!();

html!(
<ProgressStepper>
<ProgressStepperStep
status={ProgressStepperStepStatus::Success}
popover={(first_header, first_body, first_footer)}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Danger}
popover={(second_header, second_body, second_footer)}
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Default}
popover={(third_header, third_body, third_footer)}
is_current=true
>
{"Third Step"}
</ProgressStepperStep>
<ProgressStepperStep
status={ProgressStepperStepStatus::Pending}
>
{"Fourth Step"}
</ProgressStepperStep>
</ProgressStepper>
)
}

html! (<Example />)
}
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.2.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.3.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper responsive=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.4.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper centered=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.5.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper centered=true vertical=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
23 changes: 23 additions & 0 deletions src/components/progress_stepper/progress_stepper.6.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
html!(
<ProgressStepper vertical=true>
<ProgressStepperStep
description="This is the first thing to happen"
status={ProgressStepperStepStatus::Success}
>
{"First Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the second thing to happen"
status={ProgressStepperStepStatus::Default}
is_current=true
>
{"Second Step"}
</ProgressStepperStep>
<ProgressStepperStep
description="This is the last thing to happen"
status={ProgressStepperStepStatus::Pending}
>
{"Third Step"}
</ProgressStepperStep>
</ProgressStepper>
)
Loading
Loading