How to use button_type for a button made in a parameterized class using param.Event(label="Text")?

I am trying to remake part of my app, but now with a parametrized class. Prior to the remake I had a button with button_type “primary”:

pn.widgets.Button(name="Text", button_type='primary')

Now I have a button in my parametrized class, but also want it to have the visuals of a “primary” button_type:


How can I make the param.Event() button look like a “primary” button_type?

Something like this maybe:

import param
import panel as pn

class DynamicLayout(pn.viewable.Viewer):
    data_button = param.Event()
    pcm_button = param.Event()

    #text_input_param = param.String()

    def __init__(self, **params):

        self.layout_df = pn.Column()
        self.layout_graph = pn.Row(sizing_mode='stretch_both')
        self.widgets = pn.Param(self, 
                                parameters=["data_button","pcm_button" ], 
                                widgets={"data_button": {'icon':'truck-loading',"button_type": "primary","min_width":310},
                                         "pcm_button": {'icon':'graph',"button_type": "warning","min_width":310}})

    def __panel__(self):
        return pn.Column(self.widgets)




Would it be possible to pass the argument "button_type": "primary" to param.Event? I assume that if it is possible for pn.Param it should also be possible for param.Event

For example, I was hoping something like this is possible:



param.Event({"data_button": {"button_type" : "primary"})