def test_style_via_component_with_state(
    kwargs: dict[str, Any],
    expected_get_style: dict[str, Any],
):
    """Pass kwargs to a component with state vars and assert the final, combined style dict.

    Args:
        kwargs: The kwargs to pass to the component.
        expected_get_style: The expected style dict.
    """
    comp = rx.el.div(**kwargs)

    assert (
        VarData.merge(comp.style._var_data)
        == expected_get_style["css"]._get_all_var_data()
    )
    # Assert that style values are equal.
    compare_dict_of_var(comp._get_style(), expected_get_style)
Pass kwargs to a component with state vars and assert the final, combined style dict.

    Args:
        kwargs: The kwargs to pass to the component.
        expected_get_style: The expected style dict.
    
tests/units/test_style.py