Skip to content

Commit 8918918

Browse files
Add missing Grid.Item.Accessory properties and example sections (#23526)
1 parent 94a0ab9 commit 8918918

File tree

1 file changed

+27
-0
lines changed
  • docs/api-reference/user-interface

1 file changed

+27
-0
lines changed

docs/api-reference/user-interface/grid.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,33 @@ An interface describing an accessory view in a `Grid.Item`.
651651

652652
![Grid.Item accessories illustration](../../.gitbook/assets/grid-item-accessories.webp)
653653

654+
#### Properties
655+
656+
| Property | Description | Type |
657+
| :--- | :--- | :--- |
658+
| icon | An optional Image.ImageLike that will be used as the icon. | <code>[Image.ImageLike](icons-and-images.md#image.imagelike)</code> or <code>null</code> |
659+
| tooltip | An optional tooltip shown when the accessory is hovered. | <code>string</code> or <code>null</code> |
660+
661+
#### Example
662+
663+
```typescript
664+
import { Icon, Grid } from "@raycast/api";
665+
666+
export default function Command() {
667+
return (
668+
<Grid>
669+
<Grid.Item
670+
title="Daredevil"
671+
accessory={{
672+
icon: Icon.FilmStrip,
673+
tooltip: "TV Show"
674+
}}
675+
/>
676+
</Grid>
677+
);
678+
}
679+
```
680+
654681
### Grid.Inset
655682

656683
An enum representing the amount of space there should be between a Grid Item's content and its borders. The absolute value depends on the value of [Grid](#grid)'s or [Grid.Section](#grid.section)'s `columns` prop.

0 commit comments

Comments
 (0)