evcc-io/assets/js/components/Top/Navigation.stories.ts
Maschga 9293cdef3e chore: use yamlsource (#27466)
Co-authored-by: Michael Geers <michael@geers.tv>
2026-02-17 09:47:43 +00:00

65 lines
1.4 KiB
TypeScript

import Navigation from "./Navigation.vue";
import type { Meta, StoryFn } from "@storybook/vue3";
export default {
title: "Top/Navigation",
component: Navigation,
parameters: {
layout: "centered",
},
argTypes: {
authProviders: { control: "object" },
sponsor: { control: "object" },
},
} as Meta<typeof Navigation>;
const Template: StoryFn<typeof Navigation> = (args) => ({
components: { Navigation },
setup() {
return { args };
},
template: '<Navigation v-bind="args" />',
});
export const Standard = Template.bind({});
Standard.args = {};
export const OAuthStatus = Template.bind({});
OAuthStatus.args = {
authProviders: {
"Mercedes EQS": {
authenticated: true,
id: "mercedes-eqs-9oqwjdf9oqwjd",
},
"Nissan Leaf Pro": {
authenticated: true,
id: "nissan-leaf-pro-9oqwjdf9oqwjd",
},
},
};
export const PendingOAuthStatus = Template.bind({});
PendingOAuthStatus.args = {
authProviders: {
"Mercedes EQS": {
authenticated: true,
id: "mercedes-eqs-9oqwjdf9oqwjd",
},
"Nissan Leaf Pro": {
authenticated: false,
id: "nissan-leaf-pro-9oqwjdf9oqwjd",
},
},
};
export const TokenExpires = Template.bind({});
TokenExpires.args = {
sponsor: {
status: {
name: "Sponsor",
expiresAt: new Date().toISOString(),
expiresSoon: true,
},
yamlSource: "file",
},
};