-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 834-sidebar-closes-when-an-option-is-selected
- Loading branch information
Showing
9 changed files
with
158 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
projects/ion/src/lib/popover/mock/keep-open-popover-action.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Component } from '@angular/core'; | ||
import { PopoverPosition } from '../../core/types/popover'; | ||
|
||
@Component({ | ||
template: ` | ||
<style> | ||
div { | ||
height: 400px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
</style> | ||
<div> | ||
<ion-button | ||
ionPopover | ||
[ionPopoverTitle]="args.ionPopoverTitle" | ||
[ionPopoverBody]="BodyTemplate" | ||
[ionPopoverIconClose]="args.ionPopoverIconClose" | ||
[ionPopoverPosition]="args.ionPopoverPosition" | ||
[ionPopoverActions]="args.ionPopoverActions" | ||
label="click me" | ||
> | ||
</ion-button> | ||
<ng-template #BodyTemplate> {{ args.ionPopoverBody }} </ng-template> | ||
</div> | ||
`, | ||
}) | ||
export class KeepOpenPopoverActionComponent { | ||
args = { | ||
ionPopoverTitle: 'Desafio na Jornada', | ||
ionPopoverBody: | ||
'Você pode escolher avançar corajosamente para a próxima etapa da jornada ou optar por explorar o caminho anterior.', | ||
ionPopoverPosition: PopoverPosition.DEFAULT, | ||
ionPopoverIconClose: true, | ||
ionPopoverActions: [ | ||
{ label: 'voltar', keepOpenAfterAction: true }, | ||
{ label: 'continuar', keepOpenAfterAction: true }, | ||
], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { Meta, Story } from '@storybook/angular/types-6-0'; | ||
|
||
import { PopoverPosition } from '../projects/ion/src/lib/core/types/popover'; | ||
import { KeepOpenPopoverActionComponent } from '../projects/ion/src/lib/popover/mock/keep-open-popover-action.component'; | ||
import { | ||
IonPopoverModule, | ||
IonSharedModule, | ||
} from '../projects/ion/src/public-api'; | ||
|
||
const Template: Story<KeepOpenPopoverActionComponent> = ( | ||
args: KeepOpenPopoverActionComponent | ||
) => ({ | ||
component: KeepOpenPopoverActionComponent, | ||
props: { | ||
...args, | ||
}, | ||
moduleMetadata: { | ||
declarations: [KeepOpenPopoverActionComponent], | ||
imports: [CommonModule, IonSharedModule, IonPopoverModule], | ||
entryComponents: [KeepOpenPopoverActionComponent], | ||
}, | ||
}); | ||
|
||
export const DirectiveWithActionsKeepAction = Template.bind({}); | ||
DirectiveWithActionsKeepAction.args = { | ||
ionPopoverTitle: 'Desafio na Jornada', | ||
ionPopoverBody: | ||
'Você pode escolher avançar corajosamente para a próxima etapa da jornada ou optar por explorar o caminho anterior.', | ||
ionPopoverPosition: PopoverPosition.DEFAULT, | ||
ionPopoverIconClose: true, | ||
ionPopoverActions: [ | ||
{ label: 'voltar', keepOpenAfterAction: true }, | ||
{ label: 'continuar', keepOpenAfterAction: true }, | ||
], | ||
}; | ||
|
||
export default { | ||
title: 'Ion/Data Display/Popover', | ||
component: KeepOpenPopoverActionComponent, | ||
} as Meta<KeepOpenPopoverActionComponent>; |