Make fields of AiUpsellCard private (#36888)

This PR makes the fields of the `AiUpsellCard` private, for better
encapsulation.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-08-25 13:21:20 -04:00 committed by GitHub
parent 5c346a4ccf
commit 2e1ca47241
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 16 deletions

View file

@ -12,11 +12,11 @@ use crate::{SignInStatus, YoungAccountBanner, plan_definitions::PlanDefinitions}
#[derive(IntoElement, RegisterComponent)]
pub struct AiUpsellCard {
pub sign_in_status: SignInStatus,
pub sign_in: Arc<dyn Fn(&mut Window, &mut App)>,
pub account_too_young: bool,
pub user_plan: Option<Plan>,
pub tab_index: Option<isize>,
sign_in_status: SignInStatus,
sign_in: Arc<dyn Fn(&mut Window, &mut App)>,
account_too_young: bool,
user_plan: Option<Plan>,
tab_index: Option<isize>,
}
impl AiUpsellCard {
@ -43,6 +43,11 @@ impl AiUpsellCard {
tab_index: None,
}
}
pub fn tab_index(mut self, tab_index: Option<isize>) -> Self {
self.tab_index = tab_index;
self
}
}
impl RenderOnce for AiUpsellCard {