import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import { BannerTip } from './banner-tip';
import { BannerBase } from '..';
# BannerTip
`BannerTip` is an inline notification that offers users educational tips, knowledge, and helpful links
## Props
The `BannerTip` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
The `BannerTip` accepts all `BannerBase` component props below
### Logo Type
Use the `logoType` prop with the `BannerTipLogoType` enum from `../../component-library` to change the context of `BannerTip`.
Possible options:
- `BannerTipLogoType.Greeting` Default
- `BannerTipLogoType.Chat`
```jsx
import { BannerTip } from '../../component-library';
This is a demo of greeting.
This is a demo of chat.
```
### Title
Use the `title` prop to pass a string that is sentence case no period. Use the `titleProps` prop to pass additional props to the `Text` component.
```jsx
import { BannerTip } from '../../component-library';
Pass only a string through the title prop
;
```
### Description
The `description` is the content area of the `BannerTip` that must be a string. Description shouldn't repeat title and only 1-3 lines.
If content requires more than a string, see `children` prop below.
```jsx
import { BannerTip } from '../../component-library';
;
```
### Children
The `children` prop is an alternative to `description` for `BannerTip` when more than a string is needed. Children content shouldn't repeat title and only 1-3 lines.
```jsx
import { Size } from '../../../helpers/constants/design-system';
import { BannerTip } from '../../component-library';
Description shouldn't repeat title. 1-3 lines. Can contain a
hyperlink.
;
```
### Action Button Label, onClick, & Props
Use the `actionButtonLabel` prop to pass text, `actionButtonOnClick` prop to pass an onClick handler, and `actionButtonProps` prop to pass an object of [ButtonLink props](/docs/components-componentlibrary-buttonlink--default-story) for the action
```jsx
import { BannerTip, IconName } from '../../component-library';
console.log('ButtonLink actionButtonOnClick demo')}
>
Use actionButtonLabel for action text, actionButtonOnClick for the onClick
handler, and actionButtonProps to pass any ButtonLink prop types such as
iconName
;
```
### On Close
Use the `onClose` prop to pass a function to the close button. The close button will appear when this prop is used.
Additional props can be passed to the close button with `closeButtonProps`
```jsx
import { BannerTip } from '../../component-library';
console.log('close button clicked')}
>
Click the close button icon to hide this notifcation
;
```
### Start Accessory
Use the `startAccessory` prop to pass a ReactNode to the start of the `BannerTip`. This is useful for overriding the defaults defined by `BannerTip`.
```jsx
import { BannerTip } from '../../component-library';
}
title="StartAccessory"
>
This is a demo of startAccessory override.
;
```