Skip to content

Commit

Permalink
RNTester: Modernize Animated Examples Index
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yungsters authored and facebook-github-bot committed Jun 3, 2021
1 parent 0c38c44 commit 77beb42
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
41 changes: 20 additions & 21 deletions packages/rn-tester/js/examples/Animated/AnimatedExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
2 changes: 1 addition & 1 deletion packages/rn-tester/js/utils/RNTesterList.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/js/utils/RNTesterList.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const APIExamples: Array<RNTesterExample> = [
},
{
key: 'AnimatedExample',
module: require('../examples/Animated/AnimatedExample'),
module: require('../examples/Animated/AnimatedExample').default,
supportsTVOS: true,
},
{
Expand Down

0 comments on commit 77beb42

Please sign in to comment.