mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore(site): add CreateTokenPage story (#12472)
This commit is contained in:
@@ -2,6 +2,7 @@ import { css } from "@emotion/css";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
import type { FormikContextType } from "formik";
|
||||
import { type FC, useState, useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
@@ -21,6 +22,8 @@ import {
|
||||
customLifetimeDay,
|
||||
} from "./utils";
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
interface CreateTokenFormProps {
|
||||
form: FormikContextType<CreateTokenData>;
|
||||
maxTokenLifetime?: number;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { CreateTokenPage } from "./CreateTokenPage";
|
||||
|
||||
const meta: Meta<typeof CreateTokenPage> = {
|
||||
title: "components/CreateTokenPage",
|
||||
component: CreateTokenPage,
|
||||
parameters: {
|
||||
queries: [
|
||||
{
|
||||
key: ["tokenconfig"],
|
||||
data: { max_token_lifetime: 1_000 },
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof CreateTokenPage>;
|
||||
|
||||
export const Default: Story = {};
|
||||
Reference in New Issue
Block a user