@vellira-ui/react-native 2.25.1 → 2.26.1

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
@@ -111,6 +111,27 @@ export function RoleSelect() {
111
111
  }
112
112
  ```
113
113
 
114
+ ### Dropdown Notes
115
+
116
+ Use `Dropdown` for contextual actions, not saved form values. The `items` model
117
+ is flat: use `{ type: 'group', label }` as a heading before related actions and
118
+ `{ type: 'separator' }` between sections. Use `open`, `defaultOpen`, and
119
+ `onOpenChange` for menu state, and `onSelect` for the selected action value.
120
+
121
+ ```tsx
122
+ import type { DropdownItem } from '@vellira-ui/react-native';
123
+ import { Dropdown } from '@vellira-ui/react-native';
124
+
125
+ const items: DropdownItem[] = [
126
+ { type: 'group', label: 'File' },
127
+ { label: 'Duplicate', value: 'duplicate' },
128
+ { type: 'separator' },
129
+ { label: 'Delete', value: 'delete', danger: true },
130
+ ];
131
+
132
+ <Dropdown label='Actions' items={items} onSelect={handleAction} />;
133
+ ```
134
+
114
135
  ### FormField Notes
115
136
 
116
137
  `FormField` is a presentational wrapper for custom native controls. Do not wrap
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type { DropdownProps } from './components/Dropdown';
2
1
  export { Dropdown } from './components/Dropdown';
2
+ export type { DropdownGroup as DropdownGroupItem, DropdownItem, DropdownMenuItem, DropdownProps, DropdownSeparator as DropdownSeparatorItem, } from './components/Dropdown/types';
3
3
  export type { ModalProps } from './components/Modal';
4
4
  export { Modal } from './components/Modal';
5
5
  export type { RadioGroupProps } from './components/RadioGroup';