pub struct BottomButtonParams<'a> {
pub text: Option<&'a str>,
pub color: Option<&'a str>,
pub text_color: Option<&'a str>,
pub is_active: Option<bool>,
pub is_visible: Option<bool>,
pub has_shine_effect: Option<bool>,
}Expand description
Parameters accepted by bottom buttons when updating state via setParams.
§Examples
use telegram_webapp_sdk::webapp::{BottomButton, BottomButtonParams, TelegramWebApp};
if let Some(app) = TelegramWebApp::instance() {
let params = BottomButtonParams {
text: Some("Send"),
is_active: Some(true),
..Default::default()
};
let _ = app.set_bottom_button_params(BottomButton::Main, ¶ms);
}Fields§
§text: Option<&'a str>§color: Option<&'a str>§text_color: Option<&'a str>§is_active: Option<bool>§is_visible: Option<bool>§has_shine_effect: Option<bool>Trait Implementations§
Source§impl<'a> Debug for BottomButtonParams<'a>
impl<'a> Debug for BottomButtonParams<'a>
Source§impl<'a> Default for BottomButtonParams<'a>
impl<'a> Default for BottomButtonParams<'a>
Source§fn default() -> BottomButtonParams<'a>
fn default() -> BottomButtonParams<'a>
Returns the “default value” for a type. Read more