diff --git a/src/components/Chip.jsx b/src/components/Chip.jsx
index 3c691d11..3b9bad30 100644
--- a/src/components/Chip.jsx
+++ b/src/components/Chip.jsx
@@ -4,7 +4,9 @@ import { Close } from "@bigbinary/neeto-icons-rn";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import { Typography, Touchable, Container } from "@components";
+import { Container } from "./Container";
+import { Touchable } from "./Touchable";
+import { Typography } from "./Typography";
const variantStyleObj = {
solid: {
diff --git a/src/components/FAB.jsx b/src/components/FAB.jsx
index 8000363f..3208e6bb 100644
--- a/src/components/FAB.jsx
+++ b/src/components/FAB.jsx
@@ -4,8 +4,10 @@ import propTypes from "@styled-system/prop-types";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import { Touchable } from "@components";
import { theme } from "@theme";
+
+import { Touchable } from "./Touchable";
+
/**
* FAB component is a floating action button which represents the primary action in an application and is built on top of styled-system.
*
diff --git a/src/components/ListItem.jsx b/src/components/ListItem.jsx
index 13b00f70..e6a5e5c4 100644
--- a/src/components/ListItem.jsx
+++ b/src/components/ListItem.jsx
@@ -4,7 +4,8 @@ import propTypes from "@styled-system/prop-types";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import { Typography, Container } from "@components";
+import { Container } from "./Container";
+import { Typography } from "./Typography";
/**
* ListItems are components that displays a label with different values like string, toggle, button etc.
diff --git a/src/components/NotificationPreferenceList.jsx b/src/components/NotificationPreferenceList.jsx
index d3e550cb..eda86b0b 100644
--- a/src/components/NotificationPreferenceList.jsx
+++ b/src/components/NotificationPreferenceList.jsx
@@ -3,13 +3,11 @@ import React from "react";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import {
- Container,
- Typography,
- Divider,
- ToggleSwitch,
- Loader,
-} from "@components";
+import { Container } from "./Container";
+import { Divider } from "./Divider";
+import { Loader } from "./Loader";
+import { ToggleSwitch } from "./ToggleSwitch";
+import { Typography } from "./Typography";
/**
*
@@ -26,7 +24,7 @@ import {
*
* export default function Main() {
* const [data, setData] = useState([]);
- *
+ *
* const handleSwitch = (item, index) => {
* setData(prevData => {
* const newData = [...prevData];
diff --git a/src/components/OnBoarding.jsx b/src/components/OnBoarding.jsx
index 1a623d14..df189322 100644
--- a/src/components/OnBoarding.jsx
+++ b/src/components/OnBoarding.jsx
@@ -4,7 +4,10 @@ import PropTypes from "prop-types";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { moderateScale } from "react-native-size-matters";
-import { Button, Carousel, Container, Typography } from "@components";
+import { Button } from "./Button";
+import { Carousel } from "./Carousel";
+import { Container } from "./Container";
+import { Typography } from "./Typography";
/**
*
diff --git a/src/components/OtpInputs.jsx b/src/components/OtpInputs.jsx
index d342f9d3..8c665482 100644
--- a/src/components/OtpInputs.jsx
+++ b/src/components/OtpInputs.jsx
@@ -13,7 +13,8 @@ import {
color,
} from "styled-system";
-import { Container, Typography } from "@components";
+import { Container } from "./Container";
+import { Typography } from "./Typography";
import { theme } from "../theme";
diff --git a/src/components/ParentView.jsx b/src/components/ParentView.jsx
index 4b442da1..e22ef198 100644
--- a/src/components/ParentView.jsx
+++ b/src/components/ParentView.jsx
@@ -8,7 +8,7 @@ import {
} from "react-native-safe-area-context";
import { ThemeContext } from "styled-components/native";
-import { Container } from "@components";
+import { Container } from "./Container";
import { useKeyboard } from "../hooks/useKeyboard";
diff --git a/src/components/Popover.jsx b/src/components/Popover.jsx
index 8130143b..d969183e 100644
--- a/src/components/Popover.jsx
+++ b/src/components/Popover.jsx
@@ -7,7 +7,8 @@ import { moderateScale } from "react-native-size-matters";
import styled from "styled-components/native";
import { flexbox, space, border, color, layout } from "styled-system";
-import { Typography, Divider } from "@components";
+import { Divider } from "./Divider";
+import { Typography } from "./Typography";
export const TouchableOpacity = styled.TouchableOpacity`
${space}
diff --git a/src/components/SegmentedTopBar/Tab.jsx b/src/components/SegmentedTopBar/Tab.jsx
index 72b3871d..8d9e0bc7 100644
--- a/src/components/SegmentedTopBar/Tab.jsx
+++ b/src/components/SegmentedTopBar/Tab.jsx
@@ -4,7 +4,8 @@ import { View, StyleSheet } from "react-native";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import { Typography, Touchable } from "@components";
+import { Touchable } from "../Touchable";
+import { Typography } from "../Typography";
export const Tab = forwardRef(
({ label, value, navigation, flex, count }, ref) => {
diff --git a/src/components/SocialButton.jsx b/src/components/SocialButton.jsx
index 55060ccc..4dc07165 100644
--- a/src/components/SocialButton.jsx
+++ b/src/components/SocialButton.jsx
@@ -7,7 +7,11 @@ import { ThemeContext } from "styled-components/native";
import AppleLogo from "@assets/icons/apple-logo.svg";
import GoogleLogo from "@assets/icons/google-logo.svg";
-import { Container, Typography, Touchable, Loader } from "@components";
+
+import { Container } from "./Container";
+import { Loader } from "./Loader";
+import { Touchable } from "./Touchable";
+import { Typography } from "./Typography";
/**
*
diff --git a/src/components/Toast.jsx b/src/components/Toast.jsx
index 7a1bd386..093bd247 100644
--- a/src/components/Toast.jsx
+++ b/src/components/Toast.jsx
@@ -13,10 +13,13 @@ import ErrorIcon from "@assets/icons/error.svg";
import InfoIcon from "@assets/icons/info.svg";
import SuccessIcon from "@assets/icons/success.svg";
import WarningIcon from "@assets/icons/warning.svg";
-// eslint-disable-next-line import/no-cycle
-import { Container, Typography, Card, Touchable } from "@components";
import { defaultToasterConfig } from "@config";
+import { Card } from "./Card";
+import { Container } from "./Container";
+import { Touchable } from "./Touchable";
+import { Typography } from "./Typography";
+
const ToastComponent = ({ type, text1, text2, hide, isVisible }) => {
const theme = useContext(ThemeContext);
const { width } = useWindowDimensions();
diff --git a/src/components/TopBar.jsx b/src/components/TopBar.jsx
index 0a26ba07..1d3cdb84 100644
--- a/src/components/TopBar.jsx
+++ b/src/components/TopBar.jsx
@@ -4,9 +4,12 @@ import { ScrollView, StyleSheet } from "react-native";
import PropTypes from "prop-types";
import { moderateScale } from "react-native-size-matters";
-import { Container, Touchable, Typography } from "@components";
import { theme } from "@theme";
+import { Container } from "./Container";
+import { Touchable } from "./Touchable";
+import { Typography } from "./Typography";
+
/**
*
* Buttons are touchable elements used to interact with the screen and to trigger an action.
diff --git a/storybook/stories/Accordion.stories.jsx b/storybook/stories/Accordion.stories.jsx
index f1b469be..bebaa607 100644
--- a/storybook/stories/Accordion.stories.jsx
+++ b/storybook/stories/Accordion.stories.jsx
@@ -48,8 +48,8 @@ A component used to display an expandable list item.
>
> );
> }
-`
- }
+`,
+ },
};
export default AccordionStories;
diff --git a/storybook/stories/Alert.stories.jsx b/storybook/stories/Alert.stories.jsx
index b104f60b..bcaa2083 100644
--- a/storybook/stories/Alert.stories.jsx
+++ b/storybook/stories/Alert.stories.jsx
@@ -74,8 +74,9 @@ By default, the only button will be an 'OK' button.
> }}
> />
> );
-}
-`}
+}
+`,
+ },
};
export default AlertStories;
diff --git a/storybook/stories/AnimatedImage.stories.jsx b/storybook/stories/AnimatedImage.stories.jsx
index 3776d8f5..edef266b 100644
--- a/storybook/stories/AnimatedImage.stories.jsx
+++ b/storybook/stories/AnimatedImage.stories.jsx
@@ -1,4 +1,5 @@
import React from "react";
+import { Platform } from "react-native";
import { Container, AnimatedImage, Typography } from "@components";
@@ -20,7 +21,7 @@ AnimatedImage can be used to display a placeholder before image is loaded with a

-## Usage
+## Usage
>import * as React from 'react';
>import { Typography, Avatar } from '@bigbinary/neetoui-rn';
@@ -37,24 +38,49 @@ AnimatedImage can be used to display a placeholder before image is loaded with a
>
> );
>}
-`}
+`},
};
export default AnimatedImageStories;
-export const AnimatedImageDemo = args => (
-
-
-
-);
-
-export const AnimatedImages = () => (
-
-
- Image with Placeholder
-
-);
+export const AnimatedImageDemo = args => {
+ if (Platform.OS === "web") {
+ return (
+
+
+ This story is disabled on web due to animation compatibility issues.
+
+
+ );
+ }
+
+ return (
+
+
+
+ );
+};
+
+export const AnimatedImages = () => {
+ // Disable on web platform
+ if (Platform.OS === "web") {
+ return (
+
+
+ This story is disabled on web due to animation compatibility issues.
+
+
+ );
+ }
+
+ return (
+
+
+ Image with Placeholder
+
+ );
+};
diff --git a/storybook/stories/Avatar.stories.jsx b/storybook/stories/Avatar.stories.jsx
index 526bd378..3c0b238b 100644
--- a/storybook/stories/Avatar.stories.jsx
+++ b/storybook/stories/Avatar.stories.jsx
@@ -64,7 +64,8 @@ Avatars can be used to represent people in a graphical way.
>
> );
> }
-`}
+`,
+ },
};
export default AvatarStories;
diff --git a/storybook/stories/Badge.stories.jsx b/storybook/stories/Badge.stories.jsx
index 89bc53d2..12ac17f5 100644
--- a/storybook/stories/Badge.stories.jsx
+++ b/storybook/stories/Badge.stories.jsx
@@ -1,7 +1,6 @@
import React from "react";
-import { Badge, Container } from "@components";
-import { Typography } from "@components";
+import { Badge, Container, Typography } from "@components";
import { theme } from "../../src/theme";
@@ -56,10 +55,10 @@ const BadgeMetaData = {
},
},
},
- parameters:{
+ parameters: {
notes: `
This component supports below props categories from styled-system.
-
+
- flexbox
- space
- border
@@ -67,7 +66,7 @@ This component supports below props categories from styled-system.
- layout

-
+
## Usage
>import * as React from 'react';
@@ -86,8 +85,8 @@ This component supports below props categories from styled-system.
>
> );
> }
-`
- }
+`,
+ },
};
export default BadgeMetaData;
diff --git a/storybook/stories/BottomSheet.stories.jsx b/storybook/stories/BottomSheet.stories.jsx
index 2ea7ce0b..eba52eda 100644
--- a/storybook/stories/BottomSheet.stories.jsx
+++ b/storybook/stories/BottomSheet.stories.jsx
@@ -71,7 +71,8 @@ BottomSheet can be used to select an item from list of items like a DropDown
>
> );
> }
-`},
+`,
+ },
};
export default TypographyStories;
diff --git a/storybook/stories/BottomTabBar.stories.jsx b/storybook/stories/BottomTabBar.stories.jsx
index 8c70cc31..cbe12177 100644
--- a/storybook/stories/BottomTabBar.stories.jsx
+++ b/storybook/stories/BottomTabBar.stories.jsx
@@ -13,7 +13,7 @@ const BottomTabBarMetaData = {
args: {},
parameters: {
notes: `
-BottomTabBar is animated custom tabbar component which needs to used along with
+BottomTabBar is animated custom tabbar component which needs to used along with
[React Navigation & Bottom Tabs Navigator](https://reactnavigation.org/docs/bottom-tab-navigator/)
@@ -73,7 +73,8 @@ BottomTabBar is animated custom tabbar component which needs to used along with
>
> );
> }
-`}
+`,
+ },
};
export default BottomTabBarMetaData;
diff --git a/storybook/stories/Button.stories.jsx b/storybook/stories/Button.stories.jsx
index 1a19863c..91dfbd31 100644
--- a/storybook/stories/Button.stories.jsx
+++ b/storybook/stories/Button.stories.jsx
@@ -92,16 +92,11 @@ export default function Main() {
export default ButtonMetaData;
-export const ButtonDemo = args => {
- console.log({args})
-
- return (
+export const ButtonDemo = args => (
-
+
-)};
+);
export const Buttons = () => (
@@ -153,18 +148,18 @@ export const Buttons = () => (
)}
/>
);
diff --git a/storybook/stories/ButtonGroup.stories.jsx b/storybook/stories/ButtonGroup.stories.jsx
index ea04864d..186f468d 100644
--- a/storybook/stories/ButtonGroup.stories.jsx
+++ b/storybook/stories/ButtonGroup.stories.jsx
@@ -45,28 +45,29 @@ const ButtonGroupStories = {
},
},
parameters: {
- notes:`
+ notes: `
ButtonGroup is a linear set of segments, each of which function as a button that can display a different view/or perform a different action.

-
+
## Usage
>import React, { useState } from 'react';
>import { ButtonGroup } from '@bigbinary/neetoui-rn';
->
+>
>export default function Main(){
> const buttonItems = ["Button1", "Button2"];
> const [activeButton, setActiveButton] = useState(buttonItems[0]);
->
+>
> return(
>
buttonItems={buttonItems}
> onPress={setActiveButton}
> currentActiveBtn={activeButton}
> />)
->}
-`},
+>}
+`,
+ },
};
export default ButtonGroupStories;
diff --git a/storybook/stories/Calendar.stories.jsx b/storybook/stories/Calendar.stories.jsx
index 97308ebf..0ae36f2a 100644
--- a/storybook/stories/Calendar.stories.jsx
+++ b/storybook/stories/Calendar.stories.jsx
@@ -9,7 +9,7 @@ const CalendarStories = {
component: Calendar,
parameters: {
notes: `
-Calendar component built on top of
+Calendar component built on top of
[react-native-calendars](https://github.com/wix/react-native-calendars) with our custom theme.
@@ -32,11 +32,11 @@ Calendar component built on top of
> );
> }
-Checkout [react-native-calendars](https://github.com/wix/react-native-calendars)
+Checkout [react-native-calendars](https://github.com/wix/react-native-calendars)
package for all the available props
-`
- }
+`,
+ },
};
export default CalendarStories;
diff --git a/storybook/stories/Card.stories.jsx b/storybook/stories/Card.stories.jsx
index 26cadd72..49723ef0 100644
--- a/storybook/stories/Card.stories.jsx
+++ b/storybook/stories/Card.stories.jsx
@@ -2,13 +2,23 @@ import React from "react";
import { Card, Typography } from "@components";
+export const CardDemo = args => (
+
+);
+
const CardMetaData = {
title: "Card",
component: CardDemo,
argTypes: {},
args: {},
parameters: {
- notes:`
+ notes: `
This component is wrapper over Container component.
This component supports below props categories from styled-system. \n\n
@@ -21,7 +31,7 @@ This component supports below props categories from styled-system. \n\n

-## Usage
+## Usage
>import * as React from 'react';
>import { Card, Typography } from '@bigbinary/neetoui-rn';
@@ -58,5 +68,3 @@ export const Cards = () => (
>
);
-
-export const CardDemo = args => ;
diff --git a/storybook/stories/Carousel.stories.jsx b/storybook/stories/Carousel.stories.jsx
index 5395cd9e..1c429427 100644
--- a/storybook/stories/Carousel.stories.jsx
+++ b/storybook/stories/Carousel.stories.jsx
@@ -2,13 +2,34 @@ import React from "react";
import { Carousel, Container } from "@components";
+export const CarouselComponent = () => (
+
+
+
+);
+
const CarouselStories = {
title: "Carousel",
- component: CarouselStories,
+ component: CarouselComponent,
parameters: {
notes: `

-
+
This component supports below props categories from styled-system.
- flexbox
@@ -23,34 +44,14 @@ This component supports below props categories from styled-system.
>import * as React from "react";
>import { moderateScale } from "react-native-size-matters";
>import { Carousel } from "@bigbinary/neetoui-rn";
->
+>
>export default function Main() {
> return (
>
> );
> }
-`}
+`,
+ },
};
export default CarouselStories;
-
-export const CarouselComponent = () => (
-
-
-
-);
diff --git a/storybook/stories/ChatInput.stories.jsx b/storybook/stories/ChatInput.stories.jsx
index 3a2795d8..e82c0851 100644
--- a/storybook/stories/ChatInput.stories.jsx
+++ b/storybook/stories/ChatInput.stories.jsx
@@ -8,72 +8,6 @@ import {
Container,
} from "@components";
-const ChatInputMetaData = {
- title: "ChatInput",
- component: ChatInputs,
- parameters: {notes: `
-ChatInput component supports various options
-
-like \`REPLY\`, \`NOTE\` and \`FORWARD\`.
-
-This component supports below props categories from styled-system.
-
-- flexbox
-- space
-- border
-- buttonStyle
-- brandLeft
-- typography
-
-
-
-## Usage
-
-import * as React from 'react';
-import { Typography, ChatInput, Container } from '@bigbinary/neetoui-rn';
-
-export default function Main() {
- const [value, setValue] = React.useState(
- "Hey Oliver, We are working on this issue. We will keep you update");
-
- return (
-
-
- Desk Example
-
-
-
-
-
- }
- onChangeText={setValue}
- onCannedResponse={() => {
- alert("On Canned Response");
- }}
- onForward={() => {
- alert("On Forward");
- }}
- />
-
-
- );
- }
-`}
-};
-
-export default ChatInputMetaData;
-
export const ChatInputs = () => {
const chatInputRef = useRef();
@@ -151,3 +85,71 @@ export const ChatInputs = () => {
);
};
+
+const ChatInputMetaData = {
+ title: "ChatInput",
+ component: ChatInputs,
+ parameters: {
+ notes: `
+ChatInput component supports various options
+
+like \`REPLY\`, \`NOTE\` and \`FORWARD\`.
+
+This component supports below props categories from styled-system.
+
+- flexbox
+- space
+- border
+- buttonStyle
+- brandLeft
+- typography
+
+
+
+## Usage
+
+import * as React from 'react';
+import { Typography, ChatInput, Container } from '@bigbinary/neetoui-rn';
+
+export default function Main() {
+ const [value, setValue] = React.useState(
+ "Hey Oliver, We are working on this issue. We will keep you update");
+
+ return (
+
+
+ Desk Example
+
+
+
+
+
+ }
+ onChangeText={setValue}
+ onCannedResponse={() => {
+ alert("On Canned Response");
+ }}
+ onForward={() => {
+ alert("On Forward");
+ }}
+ />
+
+
+ );
+ }
+`,
+ },
+};
+
+export default ChatInputMetaData;
diff --git a/storybook/stories/CheckBox.stories.jsx b/storybook/stories/CheckBox.stories.jsx
index 2d6efffc..a27370a6 100644
--- a/storybook/stories/CheckBox.stories.jsx
+++ b/storybook/stories/CheckBox.stories.jsx
@@ -67,7 +67,8 @@ This component supports below props categories from styled-system.
>
> );
> }
-`}
+`,
+ },
};
export default CheckBoxStories;
@@ -81,7 +82,7 @@ export const CheckBoxDemo = args => {
checked={checked}
disabled={disabled}
label={label}
- onSelect={() => { }}
+ onSelect={() => {}}
/>
);
diff --git a/storybook/stories/Chip.stories.jsx b/storybook/stories/Chip.stories.jsx
index 8a0cbd4c..9c196d21 100644
--- a/storybook/stories/Chip.stories.jsx
+++ b/storybook/stories/Chip.stories.jsx
@@ -86,7 +86,7 @@ const ChipStories = {
},
},
parameters: {
- notes:`
+ notes: `
Chips are compact elements that represent an input, attribute, or action.

@@ -113,7 +113,8 @@ Chips are compact elements that represent an input, attribute, or action.
>
> );
> }
-`},
+`,
+ },
};
export default ChipStories;
diff --git a/storybook/stories/Divider.stories.jsx b/storybook/stories/Divider.stories.jsx
index dda00707..bfecef99 100644
--- a/storybook/stories/Divider.stories.jsx
+++ b/storybook/stories/Divider.stories.jsx
@@ -50,7 +50,8 @@ Divider is a separator line that can be used between two different sections.
>
> );
> }
-`},
+`,
+ },
};
export default DividerStories;
diff --git a/storybook/stories/FAB.stories.jsx b/storybook/stories/FAB.stories.jsx
index 3a8aadb4..35bc176f 100644
--- a/storybook/stories/FAB.stories.jsx
+++ b/storybook/stories/FAB.stories.jsx
@@ -52,8 +52,9 @@ This component supports below props categories from styled-system.
> />
>
> );
->}
-`},
+>}
+`,
+ },
};
export default FABStories;
diff --git a/storybook/stories/FlashList.stories.jsx b/storybook/stories/FlashList.stories.jsx
index 21c054f1..3bf7e625 100644
--- a/storybook/stories/FlashList.stories.jsx
+++ b/storybook/stories/FlashList.stories.jsx
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from "react";
+
import {
FlashList as FlashListComponent,
Container,
diff --git a/storybook/stories/Input.stories.jsx b/storybook/stories/Input.stories.jsx
index 9e2a1d9b..8378ea68 100644
--- a/storybook/stories/Input.stories.jsx
+++ b/storybook/stories/Input.stories.jsx
@@ -1,6 +1,7 @@
import React from "react";
import { EmailSent, Down } from "@bigbinary/neeto-icons-rn";
+
import { Input, Container, Typography } from "@components";
import { theme } from "../../src/theme";
@@ -16,6 +17,12 @@ const keyBoardTypes = [
"web-search",
];
+const InputDemo = args => {
+ const [value, setValue] = React.useState(args.value);
+
+ return ;
+};
+
const InputMetaData = {
title: "Input",
component: InputDemo,
@@ -93,7 +100,8 @@ This component supports below props categories from styled-system.
>
> );
>}
-`}
+`,
+ },
};
export default InputMetaData;
@@ -203,14 +211,14 @@ export const Inputs = () => (
{}}
@@ -218,9 +226,3 @@ export const Inputs = () => (
>
);
-
-const InputDemo = args => {
- const [value, setValue] = React.useState(args.value);
-
- return ;
-};
diff --git a/storybook/stories/InputEmailChip.stories.jsx b/storybook/stories/InputEmailChip.stories.jsx
index 8925d5df..fd8dc6f8 100644
--- a/storybook/stories/InputEmailChip.stories.jsx
+++ b/storybook/stories/InputEmailChip.stories.jsx
@@ -2,6 +2,27 @@ import React, { useState } from "react";
import { InputEmailChip, Container, Typography } from "@components";
+export const InputEmailChipDemo = () => (
+ <>
+
+
+
+
+ >
+);
+
const InputEmailChipMetaData = {
title: "InputEmailChip",
component: InputEmailChipDemo,
@@ -33,24 +54,3 @@ const Template = args => {
);
};
-
-export const InputEmailChipDemo = () => (
- <>
-
-
-
-
- >
-);
diff --git a/storybook/stories/LineLoader.stories.jsx b/storybook/stories/LineLoader.stories.jsx
index cd250960..e26c8c34 100644
--- a/storybook/stories/LineLoader.stories.jsx
+++ b/storybook/stories/LineLoader.stories.jsx
@@ -4,13 +4,6 @@ import { moderateScale } from "react-native-size-matters";
import { LineLoader, Typography, Container } from "@components";
-const LineLoaderMetaData = {
- title: "LineLoader",
- component: LineLoaders,
-};
-
-export default LineLoaderMetaData;
-
export const LineLoaders = () => (
@@ -31,3 +24,10 @@ export const LineLoaders = () => (
);
+
+const LineLoaderMetaData = {
+ title: "LineLoader",
+ component: LineLoaders,
+};
+
+export default LineLoaderMetaData;
diff --git a/storybook/stories/ListItem.stories.jsx b/storybook/stories/ListItem.stories.jsx
index 8a8a763d..e1e7d980 100644
--- a/storybook/stories/ListItem.stories.jsx
+++ b/storybook/stories/ListItem.stories.jsx
@@ -16,7 +16,7 @@ const ListItemMetaData = {
},
},
parameters: {
- notes:`
+ notes: `
ListItems are components that displays a label with different values like string, toggle, button etc.

@@ -36,7 +36,8 @@ ListItems are components that displays a label with different values like string
>
> );
>}
-`},
+`,
+ },
};
export default ListItemMetaData;
diff --git a/storybook/stories/Loader.stories.jsx b/storybook/stories/Loader.stories.jsx
index fb1e06ea..d9ce1d8d 100644
--- a/storybook/stories/Loader.stories.jsx
+++ b/storybook/stories/Loader.stories.jsx
@@ -1,6 +1,7 @@
import React from "react";
+import { Platform } from "react-native";
-import { Loader, Alert, Container, Touchable } from "@components";
+import { Loader, Alert, Container, Touchable, Typography } from "@components";
import { theme } from "@theme";
const LoaderStories = {
@@ -23,50 +24,63 @@ Component is used to show a loading indication to user.
>
> )
>}
-`}
+`,
+ },
};
export default LoaderStories;
-export const Loaders = () => (
-
-
-
-
-
-
-
-
-
-
-
-
+export const Loaders = () => {
+ if (Platform.OS === "web") {
+ return (
+
+
+ This story is disabled on web due to animation compatibility issues.
+
+
+ );
+ }
+
+ return (
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-);
+ );
+};
diff --git a/storybook/stories/MultiSelect.stories.jsx b/storybook/stories/MultiSelect.stories.jsx
index 87ba9fb5..0e4fb27a 100644
--- a/storybook/stories/MultiSelect.stories.jsx
+++ b/storybook/stories/MultiSelect.stories.jsx
@@ -41,7 +41,8 @@ MultiSelect can be used to select multiple options from a list of options.
> />
> );
> }
-`}
+`,
+ },
};
export default MultiSelectStories;
diff --git a/storybook/stories/NotificationPreferenceList.stories.jsx b/storybook/stories/NotificationPreferenceList.stories.jsx
index 3b2c7b7e..0340be9b 100644
--- a/storybook/stories/NotificationPreferenceList.stories.jsx
+++ b/storybook/stories/NotificationPreferenceList.stories.jsx
@@ -1,9 +1,10 @@
import React, { useContext, useEffect, useState } from "react";
+import { Platform } from "react-native";
import { Notification } from "@bigbinary/neeto-icons-rn";
import { ThemeContext } from "styled-components/native";
-import { NotificationPreferenceList, Container } from "@components";
+import { NotificationPreferenceList, Container, Typography } from "@components";
const NotificationPreferenceListMetaData = {
title: "NotificationPreferenceList",
@@ -21,7 +22,7 @@ Buttons are touchable elements used to interact with the screen and to trigger a
>export default function Main() {
> const [data, setData] = useState([]);
->
+>
> const handleSwitch = (item, index) => {
> setData(prevData => {
> const newData = [...prevData];
@@ -29,7 +30,7 @@ Buttons are touchable elements used to interact with the screen and to trigger a
> return newData;
> });
> };
->
+>
> useEffect(() => {
> setData([
> {
@@ -66,14 +67,15 @@ Buttons are touchable elements used to interact with the screen and to trigger a
> },
> ]);
> }, []);
->
+>
> return (
>
> {data && }
>
> );
> }
-`}
+`,
+ },
};
export default NotificationPreferenceListMetaData;
@@ -124,6 +126,16 @@ export const NotificationPreferenceListComponent = () => {
]);
}, []);
+ if (Platform.OS === "web") {
+ return (
+
+
+ This story is disabled on web due to animation compatibility issues.
+
+
+ );
+ }
+
return (
{data && (
diff --git a/storybook/stories/OnBoarding.stories.jsx b/storybook/stories/OnBoarding.stories.jsx
index 6fc995a9..723b5f5b 100644
--- a/storybook/stories/OnBoarding.stories.jsx
+++ b/storybook/stories/OnBoarding.stories.jsx
@@ -6,9 +6,42 @@ import { OnBoarding } from "@components";
import Neeto from "../../public/assets/images/neeto.svg";
+export const OnBoardingComponent = () => {
+ const ref = useRef();
+
+ return (
+
+ ,
+ },
+ {
+ title: "Track using Calendar",
+ description:
+ "Switch between any day to view your timesheet entries.",
+ illustration: ,
+ },
+ {
+ title: "Manage Projects",
+ description:
+ "Browse through projects and manage by adding or leaving from it. ",
+ illustration: ,
+ },
+ ]}
+ onBoardingRef={ref}
+ onComplete={() => {}}
+ />
+
+ );
+};
+
const OnBoardingStories = {
title: "OnBoarding",
- component: OnBoardingStories,
+ component: OnBoardingComponent,
parameters: {
notes: `
This component supports below props categories from styled-system.
@@ -41,41 +74,9 @@ This component supports below props categories from styled-system.
> onComplete={() =>{ console.log("Completed");}}
> />
> );
-> }
-`}
+> }
+`,
+ },
};
export default OnBoardingStories;
-
-export const OnBoardingComponent = () => {
- const ref = useRef();
-
- return (
-
- ,
- },
- {
- title: "Track using Calendar",
- description:
- "Switch between any day to view your timesheet entries.",
- illustration: ,
- },
- {
- title: "Manage Projects",
- description:
- "Browse through projects and manage by adding or leaving from it. ",
- illustration: ,
- },
- ]}
- onBoardingRef={ref}
- onComplete={() => {}}
- />
-
- );
-};
diff --git a/storybook/stories/OrganizationItem.stories.jsx b/storybook/stories/OrganizationItem.stories.jsx
index 107a537b..f0128493 100644
--- a/storybook/stories/OrganizationItem.stories.jsx
+++ b/storybook/stories/OrganizationItem.stories.jsx
@@ -19,7 +19,8 @@ const OrganizationItemMetaData = {
>
> );
> }
-`}
+`,
+ },
};
export default OrganizationItemMetaData;
diff --git a/storybook/stories/OtpInputs.stories.jsx b/storybook/stories/OtpInputs.stories.jsx
index 2004153d..c7e2cb1a 100644
--- a/storybook/stories/OtpInputs.stories.jsx
+++ b/storybook/stories/OtpInputs.stories.jsx
@@ -19,17 +19,17 @@ One-Time password input component.
>import { Container, OtpInputs, Typography} from '@bigbinary/neetoui-rn';
>export default function Main() {
- const [code, setCode] = useState("");
- return (
-
+ const [code, setCode] = useState("");
+ return (
+
Your entered otp code is {code}
);
- `
- }
+ `,
+ },
};
export default OtpInputsMeta;
diff --git a/storybook/stories/Popover.stories.jsx b/storybook/stories/Popover.stories.jsx
index 26e1c504..b6cae475 100644
--- a/storybook/stories/Popover.stories.jsx
+++ b/storybook/stories/Popover.stories.jsx
@@ -11,10 +11,11 @@ const PopoverStories = {
component: Popover,
argTypes: {},
args: {},
- parameters: {notes: `
-A Lightweight Popover component over
+ parameters: {
+ notes: `
+A Lightweight Popover component over
-[react-native-popover-view](https://www.npmjs.com/package/react-native-popover-view)
+[react-native-popover-view](https://www.npmjs.com/package/react-native-popover-view)
which can be rendered with array of data or with custom body.
@@ -89,7 +90,8 @@ which can be rendered with array of data or with custom body.
>
> );
> }
-`}
+`,
+ },
};
export default PopoverStories;
diff --git a/storybook/stories/RadioButton.stories.jsx b/storybook/stories/RadioButton.stories.jsx
index b1e893c2..dd382f8b 100644
--- a/storybook/stories/RadioButton.stories.jsx
+++ b/storybook/stories/RadioButton.stories.jsx
@@ -1,4 +1,4 @@
-import React, { useContext, useState } from "react";
+import React, { useState } from "react";
import { Container, RadioButton } from "@components";
@@ -27,7 +27,8 @@ const RadioButtonStories = {
selected: false,
label: "Radio button demo",
},
- parameters: {notes: `
+ parameters: {
+ notes: `

@@ -69,7 +70,8 @@ This component supports below props categories from styled-system.
>
> );
> }
-`}
+`,
+ },
};
export default RadioButtonStories;
@@ -83,7 +85,7 @@ export const RadioButtonDemo = args => {
disabled={disabled}
label={label}
selected={selected}
- onSelect={() => { }}
+ onSelect={() => {}}
/>
);
diff --git a/storybook/stories/RichTextEditor.stories.jsx b/storybook/stories/RichTextEditor.stories.jsx
index c2891c6e..a5ca8aac 100644
--- a/storybook/stories/RichTextEditor.stories.jsx
+++ b/storybook/stories/RichTextEditor.stories.jsx
@@ -7,7 +7,7 @@ const RichTextEditorStories = {
title: "Rich Text Editor",
parameters: {
notes: `
-RichTextEditor component is wrapper created around react-native-pell-rich-editor.
+RichTextEditor component is wrapper created around react-native-pell-rich-editor.
This has dependency on react-native-webview, so make sure to add that as well.
@@ -51,7 +51,8 @@ This has dependency on react-native-webview, so make sure to add that as well.
>
> );
> };
-`}
+`,
+ },
};
export default RichTextEditorStories;
diff --git a/storybook/stories/SearchBar.stories.jsx b/storybook/stories/SearchBar.stories.jsx
index ff6f2980..c6be3923 100644
--- a/storybook/stories/SearchBar.stories.jsx
+++ b/storybook/stories/SearchBar.stories.jsx
@@ -14,6 +14,26 @@ const keyBoardTypes = [
"web-search",
];
+export const SearchBarDemo = args => {
+ const [searchedText, setSearchedText] = useState(0);
+
+ return (
+
+
+
+ Searched expression is:
+ {searchedText}.
+
+
+ Shown with a debounced delay of:
+
+ {args.debounceDelay}
+
+
+
+ );
+};
+
const SearchBarMetaData = {
title: "SearchBar",
component: SearchBarDemo,
@@ -38,7 +58,8 @@ const SearchBarMetaData = {
keyboardType: keyBoardTypes[0],
debounceDelay: 1000,
},
- parameters:{notes: `
+ parameters: {
+ notes: `
SearchBars are used to search or filter items.

@@ -54,8 +75,9 @@ SearchBars are used to search or filter items.
> {}} />
>
> );
-> }
-`}
+> }
+`,
+ },
};
export default SearchBarMetaData;
@@ -72,23 +94,3 @@ export const Searchbar = () => (
>
);
-
-export const SearchBarDemo = args => {
- const [searchedText, setSearchedText] = useState(0);
-
- return (
-
-
-
- Searched expression is:
- {searchedText}.
-
-
- Shown with a debounced delay of:
-
- {args.debounceDelay}
-
-
-
- );
-};
diff --git a/storybook/stories/SegmentedTopBar.stories.jsx b/storybook/stories/SegmentedTopBar.stories.jsx
index 98f38ed0..27776bea 100644
--- a/storybook/stories/SegmentedTopBar.stories.jsx
+++ b/storybook/stories/SegmentedTopBar.stories.jsx
@@ -10,7 +10,8 @@ const SegmentedTopBarMetaData = {
component: SegmentedTopBar,
argTypes: {},
args: {},
- parameters: { notes: `
+ parameters: {
+ notes: `
A Segment Picker component that provides toggling between two or more views.

@@ -44,7 +45,8 @@ A Segment Picker component that provides toggling between two or more views.
>
> );
> }
-`}
+`,
+ },
};
export default SegmentedTopBarMetaData;
diff --git a/storybook/stories/SocialButton.stories.jsx b/storybook/stories/SocialButton.stories.jsx
index e8e71df6..fb15657c 100644
--- a/storybook/stories/SocialButton.stories.jsx
+++ b/storybook/stories/SocialButton.stories.jsx
@@ -23,17 +23,16 @@ Buttons are touchable elements used to interact with the screen and to trigger a
>
>
> );
-> }
-`}
+> }
+`,
+ },
};
export default ButtonMetaData;
-export const SocialButtons = () => {
- return (
-
-
-
-
- )
-};
+export const SocialButtons = () => (
+
+
+
+
+);
diff --git a/storybook/stories/ToastMessage.stories.jsx b/storybook/stories/ToastMessage.stories.jsx
index 9c4aebe7..0671a63a 100644
--- a/storybook/stories/ToastMessage.stories.jsx
+++ b/storybook/stories/ToastMessage.stories.jsx
@@ -27,9 +27,10 @@ const ToastMessage = {
},
},
},
- parameters: { notes: `
-Toast component is a wrapper over
-
+ parameters: {
+ notes: `
+Toast component is a wrapper over
+
https://github.com/calintamas/react-native-toast-message.

@@ -74,7 +75,8 @@ https://github.com/calintamas/react-native-toast-message.
>
> );
>}
-`}
+`,
+ },
};
export default ToastMessage;
diff --git a/storybook/stories/ToggleSwitch.stories.jsx b/storybook/stories/ToggleSwitch.stories.jsx
index feaf82be..39162c1d 100644
--- a/storybook/stories/ToggleSwitch.stories.jsx
+++ b/storybook/stories/ToggleSwitch.stories.jsx
@@ -36,7 +36,8 @@ ToggleSwitch component is a simple switch toggle component describes what is bei
>
> );
> }
-`},
+`,
+ },
};
export default ToggleSwitchStories;
diff --git a/storybook/stories/TopBar.stories.jsx b/storybook/stories/TopBar.stories.jsx
index 90a5b902..f277c8f3 100644
--- a/storybook/stories/TopBar.stories.jsx
+++ b/storybook/stories/TopBar.stories.jsx
@@ -4,12 +4,30 @@ import { Button, TopBar } from "@components";
const itemList = ["All", "Active", "Expired"];
+export const TopBarStories = () => {
+ const [activeTab, setActiveTab] = useState(0);
+
+ return (
+ <>
+ {
+ setActiveTab(index);
+ }}
+ />
+ setActiveTab(2)} />
+ >
+ );
+};
+
const TopBarStoriesMetaData = {
title: "TopBar",
component: TopBarStories,
argTypes: {},
args: {},
- parameters: { notes: `
+ parameters: {
+ notes: `
Buttons are touchable elements used to interact with the screen and to trigger an action.

@@ -42,24 +60,8 @@ Buttons are touchable elements used to interact with the screen and to trigger a
> >
> );
> }
-`}
+`,
+ },
};
export default TopBarStoriesMetaData;
-
-export const TopBarStories = () => {
- const [activeTab, setActiveTab] = useState(0);
-
- return (
- <>
- {
- setActiveTab(index);
- }}
- />
- setActiveTab(2)} />
- >
- );
-};
diff --git a/storybook/stories/Touchable.stories.jsx b/storybook/stories/Touchable.stories.jsx
index ba3fb2a3..c072720e 100644
--- a/storybook/stories/Touchable.stories.jsx
+++ b/storybook/stories/Touchable.stories.jsx
@@ -2,12 +2,27 @@ import React from "react";
import { Touchable, Typography } from "@components";
+export const TouchableDemo = args => (
+
+ Touchable
+
+);
+
const TouchableMetaData = {
title: "Touchable",
component: TouchableDemo,
argTypes: {},
args: {},
- parameters: { notes: `
+ parameters: {
+ notes: `
Touchable component is a wrapper over Ripple.
This component supports below props categories from styled-system.
@@ -40,7 +55,8 @@ This component supports below props categories from styled-system.
>
> );
> }
-`}
+`,
+ },
};
export default TouchableMetaData;
@@ -71,11 +87,3 @@ export const Touchables = () => (
>
);
-
-export const TouchableDemo = args => Touchable
-;
diff --git a/storybook/stories/Typography.stories.jsx b/storybook/stories/Typography.stories.jsx
index a9048344..3ce95f57 100644
--- a/storybook/stories/Typography.stories.jsx
+++ b/storybook/stories/Typography.stories.jsx
@@ -103,7 +103,7 @@ This component supports below props categories from [styled-system ](/styled-sys
>
> );
> }
-`
+`,
},
};
export default TypographyStories;
diff --git a/webpack.config.js b/webpack.config.js
index df7c8c92..18184389 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -52,7 +52,7 @@ const ttfLoaderConfiguration = {
use: {
loader: "url-loader",
},
- include: [path.resolve(appDirectory, "./assets")],
+ include: [path.resolve(appDirectory, "./src/assets")],
};
const svgLoaderConfiguration = {
@@ -84,7 +84,15 @@ module.exports = {
filename: "rnw.bundle.js",
},
resolve: {
- extensions: [".web.tsx", ".web.ts", ".tsx", ".ts", ".web.js", ".js", ".jsx"],
+ extensions: [
+ ".web.tsx",
+ ".web.ts",
+ ".tsx",
+ ".ts",
+ ".web.js",
+ ".js",
+ ".jsx",
+ ],
alias: {
"react-native$": "react-native-web",
},
@@ -113,6 +121,6 @@ module.exports = {
performance: {
hints: false,
maxEntrypointSize: 512000,
- maxAssetSize: 512000
- }
+ maxAssetSize: 512000,
+ },
};