/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; import RNTesterText from '../../components/RNTesterText'; import React from 'react'; import {Platform, PlatformColor, StyleSheet, View} from 'react-native'; type Props = $ReadOnly<{ style: ViewStyleProp, testID?: string, children?: React.Node, }>; function GradientBox(props: Props): React.Node { return ( {props.children} ); } const styles = StyleSheet.create({ box: { width: 200, height: 100, justifyContent: 'center', alignItems: 'center', marginVertical: 10, }, text: { color: 'white', fontWeight: 'bold', }, }); exports.title = 'Linear Gradient'; exports.category = 'UI'; exports.description = 'Examples of linear gradients applied to views.'; exports.examples = [ { title: 'Basic Linear Gradient', description: 'Linear gradient from top to bottom', render(): React.Node { return ( Linear Gradient ); }, }, { title: 'Linear Gradient with corner angle', description: 'Rectangular Linear gradient with corner angle', render(): React.Node { return ( ); }, }, { title: 'Multiple linear gradients', render(): React.Node { return ( ); }, }, { title: 'Diagonal Gradient', description: 'Linear gradient from top-left to bottom-right', render(): React.Node { return ( ); }, }, { title: 'Gradient with angle', description: 'Linear gradient with angle', render(): React.Node { return ( ); }, }, { title: 'Multiple Color Stops', render(): React.Node { return ( ); }, }, { title: 'Linear gradient with object style syntax', render(): React.Node { return ( ); }, }, { title: 'Gradient with uniform border style', render(): React.Node { return ( ); }, }, { title: 'Gradient with non-uniform border style', render(): React.Node { return ( ); }, }, { title: 'Gradient with Platform colors', render(): React.Node { return ( ); }, }, { title: 'Transition hint', render(): React.Node { return ( ); }, }, { title: 'with px and % combination', render(): React.Node { return ( ); }, }, ];