move around stories

This commit is contained in:
Nate Kelley 2025-03-04 11:56:15 -07:00
parent 27138a414c
commit cbcd6fccb5
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
5 changed files with 42 additions and 46 deletions

View File

@ -4,7 +4,7 @@ import { Button } from '../buttons';
import { fn } from '@storybook/test';
const meta: Meta<typeof StatusCard> = {
title: 'UI/Card/StatusCard',
title: 'UI/Cards/StatusCard',
component: StatusCard,
tags: ['autodocs'],
argTypes: {

View File

@ -4,7 +4,7 @@ import { Button } from '../buttons/Button';
import { fn } from '@storybook/test';
const meta: Meta<typeof SuccessCard> = {
title: 'UI/card/SuccessCard',
title: 'UI/Cards/SuccessCard',
component: SuccessCard,
parameters: {
layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { StatusIndicator } from './StatusIndicator';
const meta = {
title: 'UI/StatusIndicator',
title: 'UI/Icons/StatusIndicator',
component: StatusIndicator,
parameters: {
layout: 'centered'

View File

@ -1,6 +1,6 @@
import React from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { RadioChecked, Radio, CircleWarning } from '../icons';
import { RadioChecked, CircleWarning } from '../icons';
import { cn } from '@/lib/classMerge';
const animationConfig = {

View File

@ -2,14 +2,12 @@
import { BusterLogo } from '@/assets/svg/BusterLogo';
import React, { useRef } from 'react';
import { Title } from '@/components/ui/typography';
import { Button, Input, InputRef, Typography } from 'antd';
import { LoginConfigProvider } from '@/app/auth/_LoginComponents/LoginConfigProvider';
import { ShareAssetType } from '@/api/asset_interfaces';
import type { ShareAssetType } from '@/api/asset_interfaces';
import { useBusterAssetsContextSelector } from '@/context/Assets/BusterAssetsProvider';
import { useMemoizedFn } from 'ahooks';
const { Text } = Typography;
import { Title, Text } from '@/components/ui/typography';
import { Button } from '@/components/ui/buttons';
import { Input } from '@/components/ui/inputs';
export const AppPasswordAccess: React.FC<{
metricId?: string;
@ -43,7 +41,7 @@ const AppPasswordInputComponent: React.FC<{
dashboardId?: string;
}> = ({ password, error, metricId, dashboardId }) => {
const setAssetPassword = useBusterAssetsContextSelector((state) => state.setAssetPassword);
const inputRef = useRef<InputRef>(null);
const inputRef = useRef<HTMLInputElement>(null);
const onEnterPassword = useMemoizedFn((v: string) => {
setAssetPassword(metricId || dashboardId!, v);
@ -54,13 +52,12 @@ const AppPasswordInputComponent: React.FC<{
});
const onEnterButtonPress = useMemoizedFn(() => {
const value = inputRef.current?.input?.value;
const value = inputRef.current?.value;
if (!value) return;
onEnterPassword(value || '');
});
return (
<LoginConfigProvider>
<div
className="flex h-full min-h-[100vh] w-full justify-center"
style={{
@ -86,18 +83,17 @@ const AppPasswordInputComponent: React.FC<{
type="password"
/>
{error ? (
<Text className="mb-1!" type="danger">
<Text className="mb-1!" variant="danger">
{error}
</Text>
) : null}
</div>
<Button block type="primary" onClick={onEnterButtonPress}>
<Button block variant="black" onClick={onEnterButtonPress}>
Submit
</Button>
</div>
</div>
</div>
</LoginConfigProvider>
);
};