Skip to content

Commit

Permalink
chore: upgrade to Angular 15 - gio license expiration notification
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaudAV committed Jan 29, 2024
1 parent fa9b603 commit a6633ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $expiration-notification-container-height: 152px;
}

&__text {
@include mat.typography-level($typography, subheading-1);
@include mat.typography-level($typography, body-1);

margin: 24px 12px;
text-align: left;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { moduleMetadata, Meta, Args } from '@storybook/angular';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { Story } from '@storybook/angular/types-7-0';
import { HttpClientModule } from '@angular/common/http';
import { withDesign } from 'storybook-addon-designs';
import { moduleMetadata, Meta, Args, StoryObj } from '@storybook/angular';
import { computeStylesForStory, GioMenuModule } from '@gravitee/ui-particles-angular';

import { GioLicenseExpirationNotificationComponent } from './gio-license-expiration-notification.component';
Expand All @@ -28,9 +24,8 @@ export default {
component: GioLicenseExpirationNotificationComponent,
decorators: [
moduleMetadata({
imports: [GioLicenseExpirationNotificationModule, GioMenuModule, NoopAnimationsModule, HttpClientModule],
imports: [GioLicenseExpirationNotificationModule, GioMenuModule],
}),
withDesign,
],
render: () => ({}),
} as Meta;
Expand All @@ -41,15 +36,13 @@ const getExpirationDate = (args: Args) => new Date(args.expirationDate);
const getShowCallToAction = (args: Args) => args.showCallToAction;
const getLink = (args: Args) => args.callToActionLink;

export const Default: Story = {
export const Default: StoryObj = {
argTypes: {
expirationDate: {
control: 'date',
defaultValue: new Date(),
},
showCallToAction: {
control: 'boolean',
defaultValue: true,
},
callToActionMessage: {
type: 'string',
Expand All @@ -58,6 +51,10 @@ export const Default: Story = {
type: 'string',
},
},
args: {
showCallToAction: true,
expirationDate: new Date(),
},
render: args => {
return {
template: `<gio-license-expiration-notification [expirationDate]="expirationDate" [showCallToAction]="showCallToAction" [callToActionMessage]="callToActionMessage" [link]="link"></gio-license-expiration-notification>
Expand Down Expand Up @@ -93,7 +90,7 @@ const gioMenuContent = `
<gio-menu-item tabindex="1" icon="gio:building" (click)="onClick('org')" [active]="isActive('org')">Organization settings</gio-menu-item>
</gio-menu-footer>`;

export const InMenu: Story = {
export const InMenu: StoryObj = {
render: args => {
return {
template: `
Expand Down Expand Up @@ -130,7 +127,7 @@ export const InMenu: Story = {
},
};

export const Error: Story = {
export const Error: StoryObj = {
render: _ => {
return {
template: `<gio-license-expiration-notification [expirationDate]="expirationDate" [inError]="inError"></gio-license-expiration-notification>
Expand Down

0 comments on commit a6633ad

Please sign in to comment.