refactor(web): move all types into typings folder

This commit is contained in:
Luke
2023-02-15 13:00:09 +01:00
parent 5b4c6b8674
commit 829bec2592
42 changed files with 181 additions and 169 deletions

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import { AlertProps } from '../../dialog/AlertDialog';
import { AlertProps } from '../../../typings';
export const debugAlert = () => {
debugData<AlertProps>([

View File

@@ -1,4 +1,4 @@
import { ContextMenuProps } from '../../../interfaces/context';
import { ContextMenuProps } from '../../../typings';
import { debugData } from '../../../utils/debugData';
export const debugContext = () => {
@@ -16,22 +16,22 @@ export const debugContext = () => {
colorScheme: 'blue',
metadata: [
{
["label"]: "Body",
["value"]: "55%",
["progress"]: 55
['label']: 'Body',
['value']: '55%',
['progress']: 55,
},
{
["label"]: "Engine",
["value"]: "100%",
["progress"]: 100
['label']: 'Engine',
['value']: '100%',
['progress']: 100,
},
{
["label"]: "Oil",
["progress"]: 11
['label']: 'Oil',
['progress']: 11,
},
{
["label"]: "Fuel",
["progress"]: 87
['label']: 'Fuel',
['progress']: 87,
},
],
},
@@ -56,7 +56,7 @@ export const debugContext = () => {
progress: 80,
icon: 'car-side',
metadata: [{ label: 'Durability', value: '80%' }],
colorScheme: 'blue'
colorScheme: 'blue',
},
{
title: 'Menu button',

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import { InputProps } from '../../dialog/InputDialog';
import type { InputProps } from '../../../typings';
export const debugInput = () => {
debugData<InputProps>([

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import { MenuSettings } from '../../menu/list';
import { MenuSettings } from '../../../typings';
export const debugMenu = () => {
debugData<MenuSettings>([
@@ -34,7 +34,7 @@ export const debugMenu = () => {
icon: 'car-side',
description: 'Durability: 80%',
colorScheme: 'blue',
iconColor: '#55778d'
iconColor: '#55778d',
},
{ label: 'Option 1' },
{ label: 'Option 2' },

View File

@@ -1,28 +1,30 @@
import { CustomNotificationProps } from '../../notifications/NotificationWrapper';
import { NotificationProps } from '../../../typings';
import { debugData } from '../../../utils/debugData';
export const debugCustomNotification = () => {
debugData<CustomNotificationProps>([
debugData<NotificationProps>([
{
action: 'notify',
data: {
title: 'Success',
description: 'Notification description',
type: 'success',
id: 'pogchamp',
},
},
]);
debugData<CustomNotificationProps>([
debugData<NotificationProps>([
{
action: 'notify',
data: {
title: 'Info',
title: 'Success',
description: 'Notification description',
type: 'info',
type: 'success',
id: 'pogchamp',
},
},
]);
debugData<CustomNotificationProps>([
debugData<NotificationProps>([
{
action: 'notify',
data: {
@@ -32,7 +34,7 @@ export const debugCustomNotification = () => {
},
},
]);
debugData<CustomNotificationProps>([
debugData<NotificationProps>([
{
action: 'notify',
data: {

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import { ProgressbarProps } from '../../progress/Progressbar';
import { ProgressbarProps } from '../../../typings';
export const debugProgressbar = () => {
debugData<ProgressbarProps>([

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import type { MenuItem } from '../../menu/radial';
import type { MenuItem } from '../../../typings';
export const debugRadial = () => {
debugData<{ items: MenuItem[]; sub?: boolean }>([

View File

@@ -1,5 +1,5 @@
import { debugData } from '../../../utils/debugData';
import { GameDifficulty } from '../../skillcheck';
import { GameDifficulty } from '../../../typings';
export const debugSkillCheck = () => {
debugData<{ difficulty: GameDifficulty | GameDifficulty[]; inputs?: string[] }>([

View File

@@ -1,4 +1,4 @@
import { TextUiProps } from '../../textui/TextUI';
import { TextUiProps } from '../../../typings';
import { debugData } from '../../../utils/debugData';
export const debugTextUI = () => {