RNTester: Modernize Animated Examples Index

Summary:
Minor changes to the `Animated` examples index module to make the static typing a bit more intuitive.

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D28799742

fbshipit-source-id: f798631081538e79fc58377105db4e47b9728843
This commit is contained in:
Tim Yung
2021-06-02 22:39:59 -07:00
committed by Facebook GitHub Bot
parent 0c38c44b7c
commit 77beb42499
3 changed files with 22 additions and 23 deletions
@@ -4,13 +4,11 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @flow
*/
'use strict';
import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes';
import type {RNTesterExampleModule} from '../../types/RNTesterTypes';
import RotatingImagesExample from './RotatingImagesExample';
import ContinuousInteractionsExample from './ContinuousInteractionsExample';
import LoopingExample from './LoopingExample';
@@ -19,20 +17,21 @@ import FadeInViewExample from './FadeInViewExample';
import ComposeAnimationsWithEasingExample from './ComposeAnimationsWithEasingExample';
import TransformBounceExample from './TransformBounceExample';
exports.framework = 'React';
exports.title = 'Animated - Examples';
exports.category = 'UI';
exports.documentationURL = 'https://reactnative.dev/docs/animated';
exports.description = ('Animated provides a powerful ' +
'and easy-to-use API for building modern, ' +
'interactive user experiences.': string);
exports.examples = ([
FadeInViewExample,
ComposeAnimationsWithEasingExample,
RotatingImagesExample,
MovingBoxExample,
TransformBounceExample,
LoopingExample,
ContinuousInteractionsExample,
]: Array<RNTesterExampleModuleItem>);
export default ({
framework: 'React',
title: 'Animated',
category: 'UI',
documentationURL: 'https://reactnative.dev/docs/animated',
description:
'Library designed to make animations fluid, powerful, and painless to ' +
'build and maintain.',
examples: [
FadeInViewExample,
ComposeAnimationsWithEasingExample,
RotatingImagesExample,
MovingBoxExample,
TransformBounceExample,
LoopingExample,
ContinuousInteractionsExample,
],
}: RNTesterExampleModule);
@@ -175,7 +175,7 @@ const APIExamples: Array<RNTesterExample> = [
{
key: 'AnimatedExample',
category: 'UI',
module: require('../examples/Animated/AnimatedExample'),
module: require('../examples/Animated/AnimatedExample').default,
},
{
key: 'Animation - GratuitousAnimation',
@@ -216,7 +216,7 @@ const APIExamples: Array<RNTesterExample> = [
},
{
key: 'AnimatedExample',
module: require('../examples/Animated/AnimatedExample'),
module: require('../examples/Animated/AnimatedExample').default,
supportsTVOS: true,
},
{