From e4fdcec9a1dc1061ba92a93d0550dbe6d8edb522 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Sun, 30 Oct 2022 01:58:05 +0000 Subject: [PATCH] update workflows --- .github/workflows/build.yml | 1 + .github/workflows/tests.yml | 1 + resources/scripts/components/elements/ScreenBlock.tsx | 11 +++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8cafd91..bc15d52b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: push: branches: - 'develop' + - '3.0-develop' pull_request: jobs: build: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e5e8b02..ef873ac4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,6 +3,7 @@ on: push: branches: - 'develop' + - '3.0-develop' pull_request: jobs: tests: diff --git a/resources/scripts/components/elements/ScreenBlock.tsx b/resources/scripts/components/elements/ScreenBlock.tsx index 74c9005e..6a045160 100644 --- a/resources/scripts/components/elements/ScreenBlock.tsx +++ b/resources/scripts/components/elements/ScreenBlock.tsx @@ -1,9 +1,14 @@ import PageContentBlock from '@/components/elements/PageContentBlock' import { Button } from '@mantine/core' +import { ComponentType } from 'react' + +export interface IconProps { + className?: string +} interface BaseProps { title: string - icon?: JSX.Element + icon?: ComponentType message: string full?: boolean onRetry?: () => void @@ -24,7 +29,7 @@ export type ScreenBlockProps = PropsWithBack | PropsWithRetry const ScreenBlock = ({ title, - icon, + icon: Icon, message, onBack, onRetry, @@ -36,6 +41,8 @@ const ScreenBlock = ({ title={title} >
+ {Icon && } +

{title}

{message}

{(onBack || onRetry) && (