@@ -18,9 +18,22 @@ extension View {
18
18
/// Sets the colors of the swatches in color selection popovers
19
19
/// displayed by color wells in this view.
20
20
///
21
+ /// Color selection popovers are displayed by color wells with
22
+ /// the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal``
23
+ /// styles.
24
+ ///
25
+ /// ```swift
26
+ /// ColorWellView(selection: $color)
27
+ /// .colorWellSwatchColors([
28
+ /// .red, .orange, .yellow, .green, .blue, .indigo,
29
+ /// .purple, .brown, .gray, .white, .black,
30
+ /// ])
31
+ /// .colorWellStyle(.expanded)
32
+ /// ```
33
+ ///
21
34
/// - Note: If the ``colorWellSecondaryAction(_:)`` modifier is
22
- /// also applied, the color wells in this view perform the provided
23
- /// action instead, and this modifier has no effect.
35
+ /// also applied, the color wells in this view perform the
36
+ /// provided action instead, and this modifier has no effect.
24
37
///
25
38
/// - Parameter colors: The colors to use to create the swatches.
26
39
@available ( macOS 11 . 0 , * )
@@ -33,11 +46,12 @@ extension View {
33
46
/// Sets an action to perform when the color areas of color wells
34
47
/// in this view are pressed.
35
48
///
36
- /// - Note: If this modifier is applied, the color wells in this
37
- /// view perform the provided action instead of displaying the
38
- /// default color selection popover. As such, modifiers that alter
39
- /// the default popover (such as ``colorWellSwatchColors(_:)``)
40
- /// do not take effect if this modifier is also applied.
49
+ /// - Note: If this modifier is applied, color wells in this view
50
+ /// with the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal``
51
+ /// styles perform this action instead of displaying the default
52
+ /// color selection popover. As such, modifiers that alter the
53
+ /// default popover (such as ``colorWellSwatchColors(_:)``) will
54
+ /// not take effect if this modifier is also applied.
41
55
///
42
56
/// - Parameter action: An action to perform when the color areas
43
57
/// of color wells in this view are pressed.
0 commit comments