ButtonRole
A value that describes the purpose of a button.
Declaration
type ButtonRole = 'cancel' | 'close' | 'confirm' | 'destructive';struct ButtonRolePass a literal, or build one with SwiftUI.ButtonRole from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'cancel'SwiftUI.ButtonRole.cancel'close'SwiftUI.ButtonRole.close'confirm'SwiftUI.ButtonRole.confirm'destructive'SwiftUI.ButtonRole.destructive
Overview
A button role provides a description of a button's purpose. For example,
the ButtonRole.destructive role indicates that a button performs
a destructive action, like delete user data:
Button("Delete", role: .destructive) { delete() }From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Other values.
- AxisThe horizontal or vertical dimension in a 2D coordinate system.
- AxisSetAn efficient set of axes.
- CapsuleA capsule shape aligned inside the frame of the view containing it.
- CircleA circle centered on the frame of the view containing it.
- ConcentricRectangleA shape whose corners you configure, individually or uniformly, to be squared, rounded, or concentric relative to a container shape's corners.
- ContentMarginGuideA guide for resolving the content margins for a view.
- ContentMarginPlacementThe placement of margins.
- ContentModeConstants that define how a view's content fills the available space.
- DatePickerComponents
- DatePickerComponents2The date and time components that a date picker shows.
- DeviceHingeA type encapsulating the state of a single hinge.
- DeviceHingeContextA type describing the context of hinges on the device.