@ovok/native/setting

Settings list components.

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

Settings list components.

Import from @ovok/native/setting.

Components

ListHeader()

function ListHeader(__namedParameters): Element;

Section header row for a settings list.

Parameters

ParameterType
__namedParametersListHeaderProps

Returns

Element


SettingList()

function SettingList(props): Element;

Settings list with section headers, rounded row groups and custom rows.

Parameters

ParameterType
propsSettingListProps

Returns

Element


SettingListItem()

function SettingListItem(item): Element;

Settings row with a title, optional left icon and a trailing arrow.

Parameters

ParameterType
itemSettingListItemProps

Returns

Element

Type Aliases

CustomSettingListItem

type CustomSettingListItem = object;

A settings list entry rendered by a custom component instead of the standard row.

Indexable

[key: string]: unknown

Properties

borderBottomRadius?
borderBottomRadius?: boolean;

Whether the item should round its bottom corners; set by the list.

borderTopRadius?
borderTopRadius?: boolean;

Whether the item should round its top corners; set by the list.

component
component: React.ComponentType<{
  borderBottomRadius?: boolean;
  borderTopRadius?: boolean;
}>;

Component that renders the entry.

custom
custom: true;

Marks the entry as custom.


SettingListItemProps

type SettingListItemProps = ListItemProps & object;

Props for SettingListItem; also accepts React Native Paper List.Item props.

Type Declaration

NameTypeDescription
borderBottomRadius?booleanWhether to round the bottom corners.
borderTopRadius?booleanWhether to round the top corners.
leftIcon?React.ComponentProps<typeof List.Icon>["icon"]Icon shown at the start of the row.
onPress()?() => voidCalled when the row is pressed.
titlestringRow title.

SettingListProps

type SettingListProps = Omit<FlashListProps<
  | SettingListItemProps
  | CustomSettingListItem
| string>, "renderItem">;

Props for SettingList: FlashList props except renderItem; data mixes section header strings, setting rows and custom rows.

Last updated on

On this page