edc_web_components/pages/
new_policy_page.rs1use crate::components::CreatePolicy;
2use patternfly_yew::prelude::*;
3use yew::prelude::*;
4
5#[derive(Clone, Debug, PartialEq, Properties)]
6pub struct NewPolicyPageProps {
7 pub on_create: Callback<()>,
8}
9
10#[component]
11pub fn NewPolicyPage(props: &NewPolicyPageProps) -> Html {
12 html!(
13 <>
14 <Title level={Level::H2} size={Size::XXXLarge}>{ "New Policy" }</Title>
15 <p>
16 { "Policies define the rules and conditions that govern the use of your data. You can add as many rules as required." }
17 </p>
18 <CreatePolicy on_create={props.on_create.clone()} />
19 </>
20 )
21}