orbital_scheduler/shared/
deferred_notice.rs1use leptos::prelude::*;
4use orbital_core_components::{
5 MessageBar, MessageBarBody, MessageBarIntent, MessageBarTitle, Text,
6};
7
8#[component]
10pub fn DeferredFeatureNotice(
11 sc_id: &'static str,
12 feature_name: &'static str,
13 #[prop(optional, into)] hint: Option<String>,
14 #[prop(optional, into)] class: MaybeProp<String>,
15) -> impl IntoView {
16 let body = hint.unwrap_or_else(|| {
17 "This capability is not available in the current Orbital scheduler release.".to_string()
18 });
19 let test_id = format!("scheduler-deferred-{sc_id}");
20 view! {
21 <div class=class data-testid=test_id>
22 <MessageBar intent=MessageBarIntent::Info>
23 <MessageBarBody>
24 <MessageBarTitle>{feature_name.to_string()}</MessageBarTitle>
25 <Text>{body}</Text>
26 </MessageBarBody>
27 </MessageBar>
28 </div>
29 }
30}