def add_actions_buttons(self, box, data): if data: name_action_button, function_action_button = data action_button = MDFlatButton( text=f"[b]{name_action_button}[/b]", theme_text_color="Custom", text_color=self.theme_cls.primary_color, on_release=function_action_button, ) action_button.markup = True box.add_widget(action_button)
def add_actions_buttons(self, instance_box: MDBoxLayout, data: list) -> None: """ Adds buttons to the banner. :param data: ['NAME BUTTON', <function>]; """ if data: name_action_button, function_action_button = data action_button = MDFlatButton( text=f"[b]{name_action_button}[/b]", theme_text_color="Custom", text_color=self.theme_cls.primary_color, on_release=function_action_button, ) action_button.markup = True instance_box.add_widget(action_button)