Skip to content

Commit acd5f08

Browse files
committed
Update documentation
1 parent 63b952d commit acd5f08

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

Sources/ColorWellKit/Documentation.docc/SwiftUI/Extensions/ColorWellView.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ When you use the ``ColorWellStyle/expanded`` or ``ColorWellStyle/minimal`` color
4646
ColorWellView(selection: $color)
4747
.colorWellSwatchColors([
4848
.red, .orange, .yellow, .green, .blue, .indigo,
49-
.purple, .brown, .gray, .black, .white,
49+
.purple, .brown, .gray, .white, .black,
5050
])
5151
.colorWellStyle(.expanded)
5252
```

Sources/ColorWellKit/Views/SwiftUI/ViewModifiers.swift

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,22 @@ extension View {
1818
/// Sets the colors of the swatches in color selection popovers
1919
/// displayed by color wells in this view.
2020
///
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+
///
2134
/// - 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.
2437
///
2538
/// - Parameter colors: The colors to use to create the swatches.
2639
@available(macOS 11.0, *)
@@ -33,11 +46,12 @@ extension View {
3346
/// Sets an action to perform when the color areas of color wells
3447
/// in this view are pressed.
3548
///
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.
4155
///
4256
/// - Parameter action: An action to perform when the color areas
4357
/// of color wells in this view are pressed.

0 commit comments

Comments
 (0)