diff --git a/Source/JavaScript/react/core/ScreenplayCoreComponents.tsx b/Source/JavaScript/react/core/ScreenplayCoreComponents.tsx new file mode 100644 index 00000000..fd6c53df --- /dev/null +++ b/Source/JavaScript/react/core/ScreenplayCoreComponents.tsx @@ -0,0 +1,72 @@ +// Copyright (c) Cratis. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import { RegisteredComponentProps } from '../renderer'; + +function textProperty(properties: Record, name: string, fallback = ''): string { + return typeof properties[name] === 'string' ? properties[name] : fallback; +} + +/** Carries a Screenplay data declaration without adding visual chrome. */ +export function CoreData({ element }: RegisteredComponentProps) { + return