mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
fix(react-native-collapsible/Accordion): Use any[] type for sections.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ export interface AccordionProps {
|
||||
/**
|
||||
* An array of sections passed to the render methods
|
||||
*/
|
||||
sections: string[];
|
||||
sections: any[];
|
||||
|
||||
/**
|
||||
* A function that should return a renderable representing the header
|
||||
|
||||
@@ -36,3 +36,27 @@ class AccordianTest extends React.Component<any, any> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AccordionComplexTest extends React.Component<any, any> {
|
||||
_renderHeader() {
|
||||
return (
|
||||
<View />
|
||||
);
|
||||
}
|
||||
|
||||
_renderContent() {
|
||||
return (
|
||||
<View />
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Accordion
|
||||
sections={[{icon: 'foo', title: 'Section 1'}, {icon: 'bar', title: 'Section 2'}, {icon: 'baz', title: 'Section 3'}]}
|
||||
renderHeader={this._renderHeader}
|
||||
renderContent={this._renderContent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user