@prosperitainova/dumbo-react-native
Version:
Dumbo for React Native Library
38 lines • 1.38 kB
TypeScript
import React from 'react';
import { StyleProp, ViewProps, ViewStyle } from 'react-native';
import type { CarbonIcon } from '../../types/shared';
/** Action item for the web header */
export type WebHeaderAction = {
/** Icon to render (size 20) */
icon: CarbonIcon;
/** Text to describe icon */
text: string;
/** On press event */
onPress?: () => void;
/** On long press event */
onLongPress?: () => void;
};
/** Props for WebHeader component */
export type WebHeaderProps = {
/** actions to render to the right side */
actions?: WebHeaderAction[];
/** Name to show first */
mainName: string;
/** Secondary name to show after mainName (in bold) */
secondaryName: string;
/** 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;
};
/**
* WebHeader component for rendering the header bar that matches Carbon Web
*
* {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/WebHeader.tsx | Example code}
*/
export declare class WebHeader extends React.Component<WebHeaderProps> {
private get styles();
private getStateStyle;
render(): React.ReactNode;
}
//# sourceMappingURL=index.d.ts.map