Structure

MenuStyleConfiguration

A configuration of a menu.

Declaration 宣言

struct MenuStyleConfiguration

Overview 概要

Use the init(_:) initializer of Menu to create an instance using the current menu style, which you can modify to create a custom style.

For example, the following code creates a new, custom style that adds a red border to the current menu style:


struct RedBorderMenuStyle: MenuStyle {
    func makeBody(configuration: Configuration) -> some View {
        Menu(configuration)
            .border(Color.red)
    }
}

Topics 話題

Setting the Label and Content

See Also 参照

Creating a Menu from a Configuration