Skip to content

Commit

Permalink
Merge pull request #111 from cervisebas/main
Browse files Browse the repository at this point in the history
feat: add hideMenuHeader and statusBarHeight props
  • Loading branch information
fateh999 authored Jul 29, 2024
2 parents 0d40e7f + 8bc0998 commit 4d08e4b
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 118 deletions.
84 changes: 44 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,49 +103,53 @@ export default function App() {

### `DropdownProps`

| Prop | Type | Description |
| --------------------- | ----------------------------------------------------------------- | ---------------------------------------------- |
| `value` | `string` | The currently selected value. |
| `onSelect` | `(value: string) => void` | Callback function to handle value selection. |
| `options` | `Option[]` | Array of options for the dropdown. |
| `menuUpIcon` | `JSX.Element` | Custom icon for menu up state. |
| `menuDownIcon` | `JSX.Element` | Custom icon for menu down state. |
| `maxMenuHeight` | `number` | Maximum height of the dropdown menu. |
| `menuContentStyle` | `ViewStyle` | Style for the dropdown menu content. |
| `CustomDropdownItem` | `(props: DropdownItemProps) => JSX.Element` | Custom component for dropdown item. |
| `CustomDropdownInput` | `(props: DropdownInputProps) => JSX.Element` | Custom component for dropdown input. |
| `CustomMenuHeader` | `(props: DropdownHeaderProps) => JSX.Element` | Custom component for the dropdown menu header. |
| `Touchable` | `ForwardRefExoticComponent<PressableProps & RefAttributes<View>>` | Custom touchable component for the dropdown. |
| `testID` | `string` | Test ID for the dropdown component. |
| `menuTestID` | `string` | Test ID for the dropdown menu. |
| `placeholder` | `string` | Placeholder text for the dropdown input. |
| `label` | `TextInputLabelProp` | Label for the dropdown input. |
| `mode` | `'flat' \| 'outlined'` | Mode for the dropdown input. |
| `disabled` | `boolean` | Whether the dropdown is disabled. |
| `error` | `boolean` | Whether the dropdown has an error. |
| Prop | Type | Description |
| --------------------- | ----------------------------------------------------------------- | ---------------------------------------------------- |
| `testID` | `string` | Test ID for the dropdown component. |
| `menuTestID` | `string` | Test ID for the dropdown menu. |
| `value` | `string` | The currently selected value. |
| `onSelect` | `(value: string) => void` | Callback function to handle value selection. |
| `options` | `Option[]` | Array of options for the dropdown. |
| `menuUpIcon` | `JSX.Element` | Custom icon for menu up state. |
| `menuDownIcon` | `JSX.Element` | Custom icon for menu down state. |
| `maxMenuHeight` | `number` | Maximum height of the dropdown menu. |
| `menuContentStyle` | `ViewStyle` | Style for the dropdown menu content. |
| `CustomDropdownItem` | `(props: DropdownItemProps) => JSX.Element` | Custom component for dropdown item. |
| `CustomDropdownInput` | `(props: DropdownInputProps) => JSX.Element` | Custom component for dropdown input. |
| `CustomMenuHeader` | `(props: DropdownHeaderProps) => JSX.Element` | Custom component for the dropdown menu header. |
| `Touchable` | `ForwardRefExoticComponent<PressableProps & RefAttributes<View>>` | Custom touchable component for the dropdown. |
| `placeholder` | `string` | Placeholder text for the dropdown input. |
| `label` | `TextInputLabelProp` | Label for the dropdown input. |
| `mode` | `'flat' \| 'outlined'` | Mode for the dropdown input. |
| `disabled` | `boolean` | Whether the dropdown is disabled. |
| `error` | `boolean` | Whether the dropdown has an error. |
| `hideMenuHeader` | `boolean` | Hide menu header component (default: false). |
| `statusBarHeight` | `number` | Additional top margin for the status bar on Android. |

### `MultiSelectDropdownProps`

| Prop | Type | Description |
| -------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------- |
| `value` | `string[]` | The currently selected values. |
| `onSelect` | `(value: string[]) => void` | Callback function to handle value selection. |
| `options` | `Option[]` | Array of options for the dropdown. |
| `menuUpIcon` | `JSX.Element` | Custom icon for menu up state. |
| `menuDownIcon` | `JSX.Element` | Custom icon for menu down state. |
| `Touchable` | `ForwardRefExoticComponent<PressableProps & RefAttributes<View>>` | Custom touchable component for the dropdown. |
| `maxMenuHeight` | `number` | Maximum height of the dropdown menu. |
| `menuContentStyle` | `ViewStyle` | Style for the dropdown menu content. |
| `CustomMultiSelectDropdownItem` | `(props: MultiSelectDropdownItemProps) => JSX.Element` | Custom component for multi-select dropdown item. |
| `CustomMultiSelectDropdownInput` | `(props: DropdownInputProps) => JSX.Element` | Custom component for multi-select dropdown input. |
| `CustomMenuHeader` | `(props: DropdownHeaderProps) => JSX.Element` | Custom component for the dropdown menu header. |
| `testID` | `string` | Test ID for the dropdown component. |
| `menuTestID` | `string` | Test ID for the dropdown menu. |
| `placeholder` | `string` | Placeholder text for the dropdown input. |
| `label` | `TextInputLabelProp` | Label for the dropdown input. |
| `mode` | `'flat' \| 'outlined'` | Mode for the dropdown input. |
| `disabled` | `boolean` | Whether the dropdown is disabled. |
| `error` | `boolean` | Whether the dropdown has an error. |
| Prop | Type | Description |
| -------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------- |
| `testID` | `string` | Test ID for the dropdown component. |
| `menuTestID` | `string` | Test ID for the dropdown menu. |
| `value` | `string[]` | The currently selected values. |
| `onSelect` | `(value: string[]) => void` | Callback function to handle value selection. |
| `options` | `Option[]` | Array of options for the dropdown. |
| `menuUpIcon` | `JSX.Element` | Custom icon for menu up state. |
| `menuDownIcon` | `JSX.Element` | Custom icon for menu down state. |
| `Touchable` | `ForwardRefExoticComponent<PressableProps & RefAttributes<View>>` | Custom touchable component for the dropdown. |
| `maxMenuHeight` | `number` | Maximum height of the dropdown menu. |
| `menuContentStyle` | `ViewStyle` | Style for the dropdown menu content. |
| `CustomMultiSelectDropdownItem` | `(props: MultiSelectDropdownItemProps) => JSX.Element` | Custom component for multi-select dropdown item. |
| `CustomMultiSelectDropdownInput` | `(props: DropdownInputProps) => JSX.Element` | Custom component for multi-select dropdown input. |
| `CustomMenuHeader` | `(props: DropdownHeaderProps) => JSX.Element` | Custom component for the dropdown menu header. |
| `placeholder` | `string` | Placeholder text for the dropdown input. |
| `label` | `TextInputLabelProp` | Label for the dropdown input. |
| `mode` | `'flat' \| 'outlined'` | Mode for the dropdown input. |
| `disabled` | `boolean` | Whether the dropdown is disabled. |
| `error` | `boolean` | Whether the dropdown has an error. |
| `hideMenuHeader` | `boolean` | Hide menu header component (default: false). |
| `statusBarHeight` | `number` | Additional top margin for the status bar on Android. |

## Methods

Expand Down
Loading

0 comments on commit 4d08e4b

Please sign in to comment.