diff --git a/Sources/ColorWellKit/Documentation.docc/SwiftUI/Extensions/ColorWellView.md b/Sources/ColorWellKit/Documentation.docc/SwiftUI/Extensions/ColorWellView.md index 98fe5d0..5fbb0a1 100644 --- a/Sources/ColorWellKit/Documentation.docc/SwiftUI/Extensions/ColorWellView.md +++ b/Sources/ColorWellKit/Documentation.docc/SwiftUI/Extensions/ColorWellView.md @@ -46,7 +46,7 @@ When you use the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal`` color ColorWellView(selection: $color) .colorWellSwatchColors([ .red, .orange, .yellow, .green, .blue, .indigo, - .purple, .brown, .gray, .black, .white, + .purple, .brown, .gray, .white, .black, ]) .colorWellStyle(.expanded) ``` diff --git a/Sources/ColorWellKit/Views/SwiftUI/ViewModifiers.swift b/Sources/ColorWellKit/Views/SwiftUI/ViewModifiers.swift index 2942126..7ce74e7 100644 --- a/Sources/ColorWellKit/Views/SwiftUI/ViewModifiers.swift +++ b/Sources/ColorWellKit/Views/SwiftUI/ViewModifiers.swift @@ -18,9 +18,22 @@ extension View { /// Sets the colors of the swatches in color selection popovers /// displayed by color wells in this view. /// + /// Color selection popovers are displayed by color wells with + /// the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal`` + /// styles. + /// + /// ```swift + /// ColorWellView(selection: $color) + /// .colorWellSwatchColors([ + /// .red, .orange, .yellow, .green, .blue, .indigo, + /// .purple, .brown, .gray, .white, .black, + /// ]) + /// .colorWellStyle(.expanded) + /// ``` + /// /// - Note: If the ``colorWellSecondaryAction(_:)`` modifier is - /// also applied, the color wells in this view perform the provided - /// action instead, and this modifier has no effect. + /// also applied, the color wells in this view perform the + /// provided action instead, and this modifier has no effect. /// /// - Parameter colors: The colors to use to create the swatches. @available(macOS 11.0, *) @@ -33,11 +46,12 @@ extension View { /// Sets an action to perform when the color areas of color wells /// in this view are pressed. /// - /// - Note: If this modifier is applied, the color wells in this - /// view perform the provided action instead of displaying the - /// default color selection popover. As such, modifiers that alter - /// the default popover (such as ``colorWellSwatchColors(_:)``) - /// do not take effect if this modifier is also applied. + /// - Note: If this modifier is applied, color wells in this view + /// with the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal`` + /// styles perform this action instead of displaying the default + /// color selection popover. As such, modifiers that alter the + /// default popover (such as ``colorWellSwatchColors(_:)``) will + /// not take effect if this modifier is also applied. /// /// - Parameter action: An action to perform when the color areas /// of color wells in this view are pressed.