Skip to content

Commit

Permalink
chore(dotcms-ui): fix color
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Aug 16, 2024
1 parent 46cfbdf commit 9f21af8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { UPDATE_STORY_ARGS } from '@storybook/core-events';

import { BrowserModule } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';

Expand Down Expand Up @@ -41,7 +41,7 @@ const meta: Meta<AutoComplete> = {
},
decorators: [
moduleMetadata({
imports: [AutoCompleteModule, NoopAnimationsModule, BrowserModule]
imports: [AutoCompleteModule, BrowserAnimationsModule, BrowserModule]
})
],
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import {
Meta,
moduleMetadata,
StoryObj,
argsToTemplate,
componentWrapperDecorator
} from '@storybook/angular';

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { ButtonModule } from 'primeng/button';
import { Calendar } from 'primeng/calendar';
import { Calendar, CalendarModule } from 'primeng/calendar';
import { ChevronLeftIcon } from 'primeng/icons/chevronleft';

const TODAY = new Date();
const DAYS_TO_DISABLE = 5;
Expand All @@ -16,13 +23,14 @@ const meta: Meta<Calendar> = {
component: Calendar,
decorators: [
moduleMetadata({
imports: [BrowserAnimationsModule, ButtonModule]
})
imports: [BrowserAnimationsModule, ButtonModule, CalendarModule, ChevronLeftIcon]
}),
componentWrapperDecorator((story) => `<div class="h-30rem">${story}</div>`)
],
args: {
disabled: false,
readonlyInput: true,
showIcon: true,
showIcon: false,
showTime: true,
showClear: true,
inline: false,
Expand Down Expand Up @@ -72,11 +80,21 @@ const meta: Meta<Calendar> = {
description:
'Defines the quantity of the selection, valid values are "single", "multiple" and "range".'
}
}
},
render: (args) => ({
props: args,
template: `<p-calendar ${argsToTemplate(args)} />`
})
};

export default meta;

type Story = StoryObj<Calendar>;

export const Primary: Story = {};
export const Default: Story = {};

export const WithIcon: Story = {
args: {
showIcon: true
}
};
3 changes: 2 additions & 1 deletion core-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,6 @@
},
"nx": {
"includedScripts": []
}
},
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a"
}

0 comments on commit 9f21af8

Please sign in to comment.