react-resizable-panels 4.20.0 → 4.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1167,6 +1167,12 @@ The button renders nothing if closing is disabled (by the tab's `disableClose` f
1167
1167
  Its content defaults to "×" (e.g. it can be replaced with an icon),
1168
1168
  and its default `aria-label` is "Close" followed by the tab's title (or id).
1169
1169
 
1170
+ Its `children`, `className`, `style`, and `title` can also be functions of its state (see `TabCloseButtonState`):
1171
+
1172
+ ```tsx
1173
+ <TabCloseButton title={({ tabTitle }) => `Close ${tabTitle}`} />
1174
+ ```
1175
+
1170
1176
  To keep the tab open (e.g. to confirm unsaved changes first), call `event.preventDefault()` in an `onClick` handler:
1171
1177
 
1172
1178
  ```tsx
@@ -1192,5 +1198,36 @@ None
1192
1198
  #### Optional props
1193
1199
 
1194
1200
  <!-- TabCloseButton:optional-props:begin -->
1195
- None
1201
+
1202
+ <table>
1203
+ <thead>
1204
+ <tr>
1205
+ <th>Name</th>
1206
+ <th>Description</th>
1207
+ </tr>
1208
+ </thead>
1209
+ <tbody>
1210
+ <tr>
1211
+ <td>children</td>
1212
+ <td><p>Content of the element, or a function that returns it (given the component&#39;s state).</p>
1213
+ </td>
1214
+ </tr>
1215
+ <tr>
1216
+ <td>className</td>
1217
+ <td><p>Class name of the element, or a function that returns it (given the component&#39;s state).</p>
1218
+ </td>
1219
+ </tr>
1220
+ <tr>
1221
+ <td>style</td>
1222
+ <td><p>Inline styles of the element, or a function that returns them (given the component&#39;s state).</p>
1223
+ </td>
1224
+ </tr>
1225
+ <tr>
1226
+ <td>title</td>
1227
+ <td><p>Tooltip of the element, or a function that returns it (given the component&#39;s state).</p>
1228
+ </td>
1229
+ </tr>
1230
+ </tbody>
1231
+ </table>
1232
+
1196
1233
  <!-- TabCloseButton:optional-props:end -->