11import React from 'react' ;
22import { ImageStyle , TextStyle , ViewStyle } from 'react-native' ;
33
4- export type TableProps = {
4+ export type Theme = 'light' | 'dark' | 'midnight' ;
5+
6+ export interface ColorPalette {
7+ background : string ,
8+ section : string ,
9+ separator : string ,
10+ header : string ,
11+ footer : string ,
12+ accessory : string ,
13+ title : string ,
14+ subtitle : string ,
15+ disabled : string ,
16+ progress : string ,
17+
18+ underlay : string ,
19+ ripple : string ,
20+ }
21+
22+ export interface TableProps {
523 accentColor ?: string ,
6- theme ?: 'light' | 'dark' | 'midnight' ,
24+ theme ?: Theme ,
725 blendAccent ?: boolean ,
826 disabled ?: boolean ,
927
@@ -13,7 +31,8 @@ export type TableProps = {
1331 children : React . ReactNode ,
1432 scrollable ?: boolean ,
1533}
16- export type SectionProps = {
34+
35+ export interface SectionProps {
1736 disabled ?: boolean ,
1837
1938 children : React . ReactNode ,
@@ -31,7 +50,8 @@ export type SectionProps = {
3150 separatorInsetLeft ?: number ,
3251 separatorInsetRight ?: number ,
3352}
34- export type CommonCellProps = {
53+
54+ export interface CommonCellProps {
3555 style ?: ViewStyle ,
3656
3757 disabled ?: boolean ,
@@ -42,18 +62,21 @@ export type CommonCellProps = {
4262 customActionType ?: 'call' | 'compose' | 'openUrl' ,
4363 customActionTrigger ?: 'onPress' | 'onLongPress' ,
4464}
45- export type CellProps = CommonCellProps & {
65+
66+ export interface CellProps extends CommonCellProps {
4667 children : React . ReactNode ,
4768}
48- export type AccessoryCellProps = CommonCellProps & {
69+
70+ export interface AccessoryCellProps extends CommonCellProps {
4971 accessory ?: 'disclosure' | 'details' | 'checkmark' ,
5072 accessoryComponent ?: React . ReactNode ,
5173 hideAccessorySeparator ?: boolean ,
5274 loading ?: boolean ,
5375
5476 onAccessoryPress ?: ( ) => void ,
5577}
56- export type StaticCellProps = AccessoryCellProps & {
78+
79+ export interface StaticCellProps extends AccessoryCellProps {
5780 title : string ,
5881 titleStyle ?: TextStyle ,
5982 subtitle ?: string ,
@@ -62,11 +85,13 @@ export type StaticCellProps = AccessoryCellProps & {
6285
6386 iconComponent ?: React . ReactNode ,
6487}
65- export type TouchableCellProps = AccessoryCellProps | {
88+
89+ export interface TouchableCellProps extends AccessoryCellProps {
6690 title : string ,
6791 titleStyle ?: TextStyle ,
6892}
69- export type BioCellProps = AccessoryCellProps & {
93+
94+ export interface BioCellProps extends AccessoryCellProps {
7095 title : string ,
7196 titleStyle ?: TextStyle ,
7297
@@ -79,7 +104,8 @@ export type BioCellProps = AccessoryCellProps & {
79104 photoSource ?: object ,
80105 photoStyle ?: ImageStyle ,
81106}
82- export type KeyValueCellProps = AccessoryCellProps & {
107+
108+ export interface KeyValueCellProps extends AccessoryCellProps {
83109 title : string ,
84110 titleStyle ?: TextStyle ,
85111 value ?: string ,
@@ -88,7 +114,8 @@ export type KeyValueCellProps = AccessoryCellProps & {
88114
89115 iconComponent ?: React . ReactNode ,
90116}
91- export type SwitchCellProps = AccessoryCellProps & {
117+
118+ export interface SwitchCellProps extends AccessoryCellProps {
92119 title : string ,
93120 titleStyle ?: TextStyle ,
94121 value ?: boolean ,
@@ -125,3 +152,9 @@ export class KeyValueCell extends React.Component<KeyValueCellProps> {
125152
126153export class SwitchCell extends React . Component < SwitchCellProps > {
127154}
155+
156+ declare const ThemeContext : React . Context < Theme > ;
157+ declare const ThemeProvider : React . Provider < Theme > ;
158+ declare const ThemeConsumer : React . Consumer < Theme > ;
159+
160+ export { ThemeContext , ThemeProvider , ThemeConsumer } ;
0 commit comments