UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

38 lines (37 loc) 1.52 kB
/** * HelpTip module. * @module @massds/mayflower-react/HelpTip * @requires module:@massds/mayflower-assets/scss/03-organisms/help-tip * @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons * @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons */ import React from 'react'; export interface HelpTipProps { /** The text that will have one or more help tips inserted in it. */ text?: string; /** The text that will be a clickable inline toolitp */ triggerText?: string[]; /** The help text that is displayed on clicking the trigger text. You can also render children in the help text */ helpText?: string[]; /** The id for the whole component */ id: string; /** Whether you want the help text to slide up on mobile screens */ bypassMobileStyle?: boolean; /** Whether text contains html markup */ hasMarkup?: boolean; /** Themes correspond to site color scheme i.e. sass variables */ theme?: "c-primary" | "c-primary-alt" | "c-highlight" | "c-gray-dark" | "c-error-red" | "c-white"; /** Disable helptip trigger text */ disabled?: boolean; children?: React.ReactNode; } declare class HelpTip extends React.Component<HelpTipProps> { constructor(props: any); getSplitText: (text: any, triggers: any) => any; toggleOpenForKeyUp: (e: any, index: any) => void; toggleOpen: (index: any) => void; buildDangerouslyIfHasMarkup: (text: any, hasMarkup: any) => any; render(): any; } export default HelpTip;