def create(
        cls,
        **props,
    ):
        """Create an icon button component that calls toggle_color_mode on click.

        Args:
            **props: The props to pass to the component.

        Returns:
            The button component.
        """
        position: str | Var = props.pop("position", None)
        allow_system = props.pop("allow_system", False)

        # position is used to set nice defaults for positioning the icon button
        if isinstance(position, Var):
            _set_var_default(props, position, "position", "fixed", position)
            _set_var_default(props, position, "bottom", "2rem")
            _set_var_default(props, position, "top", "2rem")
            _set_var_default(props, position, "left", "2rem")
            _set_var_default(props, position, "right", "2rem")
        elif position is not None:
            if position in position_values:
                props.setdefault("position", "fixed")
                _set_static_default(props, position, "bottom", "2rem")
                _set_static_default(props, position, "top", "2rem")
                _set_static_default(props, position, "left", "2rem")
                _set_static_default(props, position, "right", "2rem")
            else:
                props["position"] = position

        props.setdefault("background", "transparent")
        props.setdefault("color", "inherit")
        props.setdefault("z_index", "20")
        props.setdefault(":hover", {"cursor": "pointer"})

        if allow_system:

            def color_mode_item(_color_mode: Literal["light", "dark", "system"]):
                return dropdown_menu.item(
                    _color_mode.title(), on_click=set_color_mode(_color_mode)
                )

            return dropdown_menu.root(
                dropdown_menu.trigger(
                    super().create(
                        ColorModeIcon.create(),
                    ),
                    **props,
                ),
                dropdown_menu.content(
                    color_mode_item("light"),
                    color_mode_item("dark"),
                    color_mode_item("system"),
                ),
            )
        return IconButton.create(
            ColorModeIcon.create(),
            on_click=toggle_color_mode,
            **props,
        )
Create an icon button component that calls toggle_color_mode on click.

        Args:
            **props: The props to pass to the component.

        Returns:
            The button component.
        
reflex/components/radix/themes/color_mode.py