Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
docs: UiPopover docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeanjones committed Dec 29, 2022
1 parent cdfbb71 commit 48a3589
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions addon/components/ui-popover/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,36 @@ import UiContextualContainer, {
import { manageFlowThroughFocus } from '@nsf-open/ember-ui-foundation/utils';

/**
* The UiPopover component attaches itself to its parent element - typically a
* button - and will display some text context in a styled flyout when the parent
* is clicked.
*
* The major difference between this an UiTooltip is that the interaction is click
* driven, and highly preferable if interactive content is to be rendered within
* a flyout.
*
* ```handlebars
* <UiButton @variant="primary">
* Log In
* <UiPopover @title="Please Log In to Your Account to Continue">
* <div class="form-group">
* <label for="username">Username</label>
* <input type="text" id="username" class="form-control" />
* </div>
*
* <div class="form-group">
* <label for="password">Password</label>
* <input type="password" id="password" class="form-control" />
* </div>
*
* <div class="text-right">
* <button type="button" class="btn btn-primary" onclick={{this.login}}>
* Login
* </button>
* </div>
* </UiPopover>
* </UiButton>
* ```
*/
export default class UiPopoverContextContainer extends UiContextualContainer {
/**
Expand Down

0 comments on commit 48a3589

Please sign in to comment.