Skip to content

Commit

Permalink
Mark store prop on Composite as required
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Aug 9, 2024
1 parent 2ab38c6 commit e9e14e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions packages/components/src/composite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ Renders a composite widget.

#### Props

##### `store`: `CompositeStore<CompositeStoreItem>`

Object returned by the `useCompositeStore` hook.

- Required: yes

##### `render`: `RenderProp<React.HTMLAttributes<any> & { ref?: React.Ref<any> | undefined; }> | React.ReactElement<any, string | React.JSXElementConstructor<any>>`

Allows the component to be rendered as a different HTML element or React component. The value can be a React element or a function that takes in the original component props and gives back a React element with the props merged.
Expand All @@ -105,12 +111,6 @@ The contents of the component.

- Required: no

##### `store`: `CompositeStore<CompositeStoreItem>`

Object returned by the `useCompositeStore` hook.

- Required: no

### `Composite.Group`

Renders a group element for composite items.
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const meta: Meta< typeof UseCompositeStorePlaceholder > = {
'RenderProp<React.HTMLAttributes<any> & { ref?: React.Ref<any> | undefined; }> | React.ReactElement<any, string | React.JSXElementConstructor<any>>',
},
},
// type: { required: true },
},
children: {
name: 'children',
Expand Down Expand Up @@ -171,6 +170,7 @@ const meta: Meta< typeof UseCompositeStorePlaceholder > = {
'CompositeStore<CompositeStoreItem>',
},
},
type: { required: true },
},
},
'Composite.Group': commonArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type CompositeProps = Pick<
/**
* Object returned by the `useCompositeStore` hook.
*/
store?: Ariakit.CompositeStore;
store: Ariakit.CompositeStore;
};

export type CompositeGroupProps = Pick<
Expand Down

0 comments on commit e9e14e5

Please sign in to comment.