Skip to content

Commit

Permalink
creacion de componente loading con animación
Browse files Browse the repository at this point in the history
  • Loading branch information
damian committed Jul 26, 2023
1 parent 99ec0d5 commit dfcb1ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ondevice/storybook.requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const getStories = () => {
"./storybook/stories/Avatar/Avatar.stories.js": require("../storybook/stories/Avatar/Avatar.stories.js"),
"./storybook/stories/CheckBox/CheckBox.stories.js": require("../storybook/stories/CheckBox/CheckBox.stories.js"),
"./storybook/stories/Image/Image.stories.js": require("../storybook/stories/Image/Image.stories.js"),
"./storybook/stories/Loading/Loading.stories.js": require("../storybook/stories/Loading/Loading.stories.js"),
"./storybook/stories/Text/Text.stories.js": require("../storybook/stories/Text/Text.stories.js"),
};
};
Expand Down
30 changes: 30 additions & 0 deletions storybook/stories/Loading/Loading.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import {Text} from 'react-native';
import Loading from '../../../src/components/Loading';

export default {
title: 'Loading',
argTypes: {
isLoading: {
options: [true, false],
},
onValueChange: {
action: 'Value changed!',
},
disabled: {
options: [true, false],
control: {type: 'radio'},
},
},
};

export const DefaultProps = (props) => <Loading {...props} />;

DefaultProps.storyName = 'default props';

DefaultProps.args = {
isLoading: true,
color: '#2979FF',
duration: 1000,
children: <Text>Loading</Text>,
};

0 comments on commit dfcb1ba

Please sign in to comment.