UNPKG

@react-native-ohos/sample-package

Version:

react native harmony sample package

28 lines (25 loc) 1.06 kB
/* * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved * Use of this source code is governed by a MIT license that can be * found in the LICENSE file. */ import { SampleViewArkTS } from "../ets/generated/components/ts" export function getDirectProps(descriptorWrapper: SampleViewArkTS.DescriptorWrapper ): Record<keyof SampleViewArkTS.DirectRawProps, any> { const props = descriptorWrapper.props return { booleanTest: props.booleanTest, booleanWithDefaultTest: props.booleanWithDefaultTest, intTest: props.intTest, intWithDefault: props.intWithDefault, floatTest: props.floatTest, floatWithDefaultTest: props.floatWithDefaultTest, doubleTest: props.doubleTest, doubleWithDefaultTest: props.doubleWithDefaultTest, stringTest: props.stringTest, stringWithDefaultTest: props.stringWithDefaultTest, colorTest: props.colorTest.toRGBAString(), arrayTest: props.arrayTest, readOnlyArrayTest: props.readOnlyArrayTest, stringEnumTest: props.stringEnumTest, } }