feat: impl IdleRender

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-04-09 14:08:58 +09:00
parent 2b19e1f732
commit b346b99527
No known key found for this signature in database
GPG key ID: 3E87B98A3F6BAB99
6 changed files with 89 additions and 34 deletions

View file

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import isChromatic from 'chromatic';
import MkAnalogClock from './MkAnalogClock.vue';
export const Default = {
render(args) {
@ -22,6 +23,14 @@ export const Default = {
template: '<MkAnalogClock v-bind="props" />',
};
},
args: {
now: isChromatic() ? () => new Date('2023-01-01T10:10:30') : undefined,
},
decorators: [
() => ({
template: '<div style="container-type:inline-size;height:100%"><div style="height:100cqmin;margin:auto;width:100cqmin"><story/></div></div>',
}),
],
parameters: {
layout: 'fullscreen',
},