UNPKG

@prosperitainova/dumbo-react-native

Version:
41 lines 2.08 kB
import React from 'react'; import { ViewProps, StyleProp, ViewStyle, GestureResponderEvent } from 'react-native'; import type { ToolbarButton } from '../../types/navigation'; import type { CarbonIcon } from '../../types/shared'; export type BottomToolbarPrimaryActionPosition = 'center' | 'right' | 'left'; /** Props for BottomToolbarPrimaryAction component */ export type BottomToolbarPrimaryActionProps = { /** Position of primary action (default is center) */ position?: BottomToolbarPrimaryActionPosition; /** Icon to load for the primary action (size 24) */ icon: CarbonIcon; /** Text to use to describe the primary action (for accessibility) */ text: string; /** Indicate if primary action is disabled */ disabled?: boolean; /** onPress event for primary button item */ onPress?: (event: GestureResponderEvent) => void; /** onLongPress event for primary button item */ onLongPress?: (event: GestureResponderEvent) => void; /** Toolbar items to load for left side. Not used for positon left. (alignment property is not respected in this view) */ leftItems?: ToolbarButton[]; /** Toolbar items to load for right side. Not used for positon right. (alignment property is not respected in this view) */ rightItems?: ToolbarButton[]; /** 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; }; /** * BottomToolbarPrimaryAction component for rendering the bottom toolbar with large primary action * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/BottomToolbarPrimaryAction.tsx | Example code} */ export declare class BottomToolbarPrimaryAction extends React.Component<BottomToolbarPrimaryActionProps> { private get styles(); private getItems; private get primaryAction(); private get mainView(); render(): React.ReactNode; } //# sourceMappingURL=index.d.ts.map