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'; import { fn } from '@storybook/test';
const meta: Meta<typeof StatusCard> = { const meta: Meta<typeof StatusCard> = {
title: 'UI/Card/StatusCard', title: 'UI/Cards/StatusCard',
component: StatusCard, component: StatusCard,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

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

View File

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

View File

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

View File

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