/**
* 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 {RNTesterModuleExample} from '../../types/RNTesterTypes';
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: 200,
justifyContent: 'center',
alignItems: 'center',
marginVertical: 10,
},
text: {
color: 'white',
fontWeight: 'bold',
},
});
exports.title = 'Radial Gradient';
exports.category = 'UI';
exports.description = 'Examples of radial gradients applied to views.';
exports.examples = [
{
title: 'Basic Radial Gradient',
description: 'Basic radial gradient with default settings',
name: 'radial-gradient-1',
render(): React.Node {
return (
Radial Gradient
);
},
},
{
title: 'Radial Gradient with position',
description: 'Radial gradient at a specific position',
name: 'radial-gradient-2',
render(): React.Node {
return (
);
},
},
{
title: 'Radial Gradient with size',
description: 'Radial gradient with different sizes',
name: 'radial-gradient-3',
render(): React.Node {
return (
);
},
},
{
title: 'Multiple Color Stops',
name: 'radial-gradient-4',
render(): React.Node {
return (
);
},
},
{
title: 'Radial gradient with object style syntax',
name: 'radial-gradient-5',
render(): React.Node {
return (
);
},
},
{
title: 'Radial Gradient with uniform border style',
name: 'radial-gradient-6',
render(): React.Node {
return (
);
},
},
{
title: 'Radial Gradient with non uniform border style',
name: 'radial-gradient-7',
render(): React.Node {
return (
);
},
},
{
title: 'Elliptical Radial Gradient',
name: 'elliptical',
render(): React.Node {
return (
);
},
},
{
title: 'Radial Gradient with Platform colors',
name: 'platform-colors',
render(): React.Node {
return (
);
},
},
{
title: 'Transition hint with percentages',
name: 'transition-hint',
render(): React.Node {
return (
);
},
},
{
title: 'Multiple radial gradients',
name: 'multiple',
render(): React.Node {
return (
);
},
},
{
title: 'Radial gradient with non-square bounds',
name: 'non-square-bounds',
render(): React.Node {
return (
);
},
},
{
title: 'Radial gradient with non-square bounds. height > width',
name: 'non-square-bounds-height-gt-width',
render(): React.Node {
return (
);
},
},
] as Array;