pub fn class(&self, class: impl ToString) -> &Self {
        self.element.add_class(class.to_string().as_ref());

        self
    }
/// Adds a class to the node.
///
/// # Example
/// ```
/// # use sycamore::prelude::*;
/// # use sycamore::builder::html::*;
/// # fn _test<G: GenericNode>() -> View<G> {
/// button().class("bg-green-500").text("My Button").build()
/// # }
/// ```
Adds a class to the node.
Adds a class to the node .
pub fn class(&self, class: impl ToString) -> &Self {
        self.element.add_class(class.to_string().as_ref());
        self
    }
pub fn class ( & self , class : impl ToString ) -> & Self { self . element . add_class ( class . to_string ( ) . as_ref ( ) ) ; self }
Adds a class to the node.
Adds a class to the node .
&self
class
impl ToString
example
None
use sycamore::prelude::*;
None
use sycamore::builder::html::*;
None
fn _test<g: genericnode>() -> view<g> {
None
}
None