PopoverTrigger
▸ PopoverTrigger(props
): null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Triggers popover containers
Parameters
Name | Type |
---|---|
props | PopoverTriggerProps & RefAttributes <HTMLButtonElement (opens in a new tab)> |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Example
<PopoverProvider>
<PopoverTrigger>Trigger</PopoverTrigger>
<Popover>Content</Popover>
</PopoverProvider>
import React from 'react' import { PopoverProvider } from '@vtex/shoreline-components' import { PopoverTrigger } from '@vtex/shoreline-components' import { Popover } from '@vtex/shoreline-components' export default function App() { return (<><PopoverProvider> <PopoverTrigger>Trigger</PopoverTrigger> <Popover>Content</Popover> </PopoverProvider></>)}
Defined in
node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/ts5.0/index.d.ts:355