@prosperitainova/dumbo-react-native
Version:
Dumbo for React Native Library
35 lines • 1.42 kB
TypeScript
import React from 'react';
import { ViewProps, StyleProp, ViewStyle } from 'react-native';
import { UiPanelItemProps } from '../UiPanelItem';
/** Props for UiPanel component */
export type UiPanelProps = {
/** Indicate if the panel should be open */
open: boolean;
/** Callback to close the panel */
onClose: () => void;
/** List of top level items to render */
items: UiPanelItemProps[];
/** Text to use for on close areas (accessibility). Defaults to ENGLISH "Close" */
onCloseText?: string;
/** Indicate if should close if pressing item with no children */
closeOnNoChildrenPress?: boolean;
/** Custom style to set on the item */
style?: StyleProp<ViewStyle>;
/** Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this. */
componentProps?: ViewProps;
};
/**
* UiPanel component for rendering a slide over panel that overlays on the UI
*
* {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/UiPanel.tsx | Example code}
*/
export declare class UiPanel extends React.Component<UiPanelProps> {
private animatedValue;
private get styles();
private loadIn;
private loadOut;
componentDidMount(): void;
componentDidUpdate(previousProps: UiPanelProps): void;
render(): React.ReactNode;
}
//# sourceMappingURL=index.d.ts.map