diff --git a/App.tsx b/App.tsx
index f4fbf280..f1ae54b8 100644
--- a/App.tsx
+++ b/App.tsx
@@ -46,11 +46,20 @@ import SwitchDemo from "./demo/components/switch-demo";
import TextareaDemo from "./demo/components/textarea-demo";
import CheckboxDemo from "./demo/components/checkbox-demo";
import RadioDemo from "./demo/components/radio-demo";
-import Stack, { HStack, VStack } from "./src/components/atoms/stack/stack";
+import SpinnerDemo from "./demo/components/spinner-demo";
+import SkeletonDemo from "./demo/components/skeleton-demo";
+import BadgeDemo from "./demo/components/badge-demo";
+import ProgressDemo from "./demo/components/progress-demo";
+import FadeDemo from "./demo/components/fade-demo";
+import ScaleFadeDemo from "./demo/components/scale-fade-demo";
+import SlideDemo from "./demo/components/slide-demo";
+import SlideFadeDemo from "./demo/components/slide-fade-demo";
+import CollapseDemo from "./demo/components/collapse-demo";
+import Stack, { HStack } from "./src/components/atoms/stack/stack";
import IconButton from "./src/components/molecules/icon-button/icon-button";
import Box from "./src/components/atoms/box/box";
import { FlatList, ScrollView } from "react-native";
-import { CheckBox, Radio, useTheme } from "./src";
+import { useTheme } from "./src";
const App = () => {
const [haveFontsLoaded] = useFonts({
@@ -191,38 +200,47 @@ const componentList: {
{
label: "Spinner",
imageSrc: require("./demo/assets/spinner.png"),
+ component: ,
},
{
label: "Skeleton",
imageSrc: require("./demo/assets/skeleton.png"),
+ component: ,
},
{
label: "Badge",
imageSrc: require("./demo/assets/badge.png"),
+ component: ,
},
{
label: "Progress",
imageSrc: require("./demo/assets/progress.png"),
+ component: ,
},
{
label: "Fade",
imageSrc: require("./demo/assets/fade.png"),
+ component: ,
},
{
label: "Scale Fade",
imageSrc: require("./demo/assets/scale-fade.png"),
+ component: ,
},
{
label: "Slide",
imageSrc: require("./demo/assets/slide.png"),
+ component: ,
},
{
label: "Slide Fade",
imageSrc: require("./demo/assets/slide-fade.png"),
+ component: ,
},
{
label: "Collapse",
imageSrc: require("./demo/assets/collapse.png"),
+ component: ,
},
];
@@ -231,27 +249,6 @@ const Index = () => {
const [activeComponent, setActiveComponent] = useState(
undefined
);
- const [radioGroupValue, setRadioGroupValue] = React.useState("B");
- const [checkboxGroupValue, setCheckboxGroupValue] = React.useState(["B"]);
- const [checked, setChecked] = React.useState(false);
- const [isLoaded, setIsLoaded] = React.useState(false);
- const [progress, setProgress] = React.useState(0);
- const [text, setText] = React.useState("");
- const [isOpen, setIsOpen] = React.useState(false);
-
- React.useEffect(() => {
- const timer = setTimeout(() => {
- setIsLoaded(true);
- }, 2000);
- return () => clearTimeout(timer);
- }, []);
-
- React.useEffect(() => {
- const progressTimer = setInterval(() => {
- if (progress < 100) setProgress(progress + 10);
- }, 500);
- return () => clearInterval(progressTimer);
- }, [progress]);
const renderMainComponent = () => {
if (!activeComponent)
@@ -365,316 +362,6 @@ const Index = () => {
);
-
- return (
-
- {/*
-
-
-
-
-
-
- setChecked(!checked)} />
-
- }
- onPress={() => setIsOpen(!isOpen)}
- >
- Save
-
-
-
-
-
- alskdnalskndalknsdad
-
-
-
-
-
- Controlled Checkbox group
- setCheckboxGroupValue(newVal)}
- >
- A
- B
- C
-
-
- */}
-
- {/*
-
- }
- previewSource={{
- uri: "https://www.wpbeginner.com/wp-content/uploads/2020/03/ultimate-small-business-resource-coronavirus.png",
- }}
- />
-
-
- Image with preview color loading
-
-
-
-
- Image with progressive loading
-
-
-
-
- Image with spinner loading
-
-
-
-
- Image with error fallback
-
- }
- source={{
- uri: "https://4kwallpapers.com/imas/wallpapers/macos-big-sur-apple-layers-fluidic-colorful-wwdc-stock-2560x1440-1455.jpg",
- }}
- previewSource={{
- uri: "https://www.wpbeginner.com/wp-content/uploads/2020/03/ultimate-small-business-resource-coronavirus.png",
- }}
- />
-
-
-
-
-
-
- setChecked(true)}>
- Default Radio
-
- Disabled Radio
- Checked Radio
- Error Radio
-
-
-
-
-
-
- setChecked(true)}>
- Default Radio
-
- Disabled Radio
- Checked Radio
- Error Radio
-
-
-
- Controlled Radio group
- setRadioGroupValue(newVal)}
- >
- A
- B
- C
-
-
-
-
- Controlled Checkbox group
- setCheckboxGroupValue(newVal)}
- >
- A
- B
- C
-
-
-
-
-
- }
- >
- Lock
-
-
-
-
-
-
-
-
-
-
-
- }
- colorScheme="primary"
- />
- }
- />
-
-
- }
- size="xs"
- >
- Save
-
- }
- size="s"
- >
- Save
-
- }
- size="m"
- >
- Save
-
- }
- size="l"
- >
- Save
-
-
- */}
-
- );
};
export default App;
diff --git a/demo/components/badge-demo.tsx b/demo/components/badge-demo.tsx
new file mode 100644
index 00000000..f0200f71
--- /dev/null
+++ b/demo/components/badge-demo.tsx
@@ -0,0 +1,169 @@
+import {
+ Text,
+ Stack,
+ HStack,
+ VStack,
+ Icon,
+ Badge,
+ IconProps,
+ withBadge,
+ AvatarProps,
+ Avatar,
+ Box,
+} from "../../src";
+import DemoSection from "./demo-section";
+
+const BadgedIcon = withBadge(1, {
+ size: "s",
+ placement: "topRight",
+ colorScheme: "danger",
+})(Icon);
+
+const BadgedIconTwo = withBadge(
+ ,
+ {
+ size: "s",
+ placement: "bottomRight",
+ }
+)(Icon);
+
+const OnlineAvatar = withBadge(undefined, {
+ placement: "bottomRight",
+ backgroundColor: "success.500",
+ size: "s",
+ minW: 15,
+ h: 15,
+ offset: -1,
+})(Avatar);
+
+const BadgeDemo = () => {
+ return (
+
+
+
+
+
+ xs
+
+ Go
+
+
+
+
+ s
+
+ Go
+
+
+
+
+ m
+
+ Go
+
+
+
+
+ l
+
+ Go
+
+
+
+
+
+
+
+
+ Rounded
+
+ Go
+
+
+
+
+ Square
+
+ Go
+
+
+
+
+
+
+
+
+ Primary
+
+ Start
+
+
+
+
+ Warning
+
+ Wait
+
+
+
+
+ Danger
+
+ Stop
+
+
+
+
+
+
+
+
+ Empty
+
+
+
+
+
+
+ Text/Number
+
+ 123
+
+
+
+
+ Custom Component
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default BadgeDemo;
diff --git a/demo/components/collapse-demo.tsx b/demo/components/collapse-demo.tsx
new file mode 100644
index 00000000..28b81500
--- /dev/null
+++ b/demo/components/collapse-demo.tsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import { VStack, Box, Button, Text, Collapse } from "../../src";
+
+const CollapseDemo = () => {
+ const [show, setShow] = useState(true);
+
+ return (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla purus
+ mi, aliquet sed augue ac, ullamcorper vulputate nisi.
+
+
+
+
+ );
+};
+
+export default CollapseDemo;
diff --git a/demo/components/fade-demo.tsx b/demo/components/fade-demo.tsx
new file mode 100644
index 00000000..06d2d450
--- /dev/null
+++ b/demo/components/fade-demo.tsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import { VStack, Box, Button, Text, Fade } from "../../src";
+
+const FadeDemo = () => {
+ const [show, setShow] = useState(true);
+
+ return (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla purus
+ mi, aliquet sed augue ac, ullamcorper vulputate nisi.
+
+
+
+
+ );
+};
+
+export default FadeDemo;
diff --git a/demo/components/progress-demo.tsx b/demo/components/progress-demo.tsx
new file mode 100644
index 00000000..522007b1
--- /dev/null
+++ b/demo/components/progress-demo.tsx
@@ -0,0 +1,95 @@
+import { useEffect, useState } from "react";
+import { Text, Stack, VStack, Progress } from "../../src";
+import DemoSection from "./demo-section";
+
+const ProgressDemo = () => {
+ const [progress, setProgress] = useState(0);
+
+ useEffect(() => {
+ const progressTimer = setInterval(() => {
+ if (progress < 100) setProgress(progress + 10);
+ }, 500);
+ return () => clearInterval(progressTimer);
+ }, [progress]);
+
+ return (
+
+
+
+
+
+ xs
+
+
+
+
+
+
+ s
+
+
+
+
+
+
+ m
+
+
+
+
+
+
+ l
+
+
+
+
+
+
+
+
+
+
+ Filled
+
+
+
+
+
+
+ Outline
+
+
+
+
+
+
+
+
+
+
+ Primary
+
+
+
+
+
+
+ Warning
+
+
+
+
+
+
+ Danger
+
+
+
+
+
+
+ );
+};
+
+export default ProgressDemo;
diff --git a/demo/components/scale-fade-demo.tsx b/demo/components/scale-fade-demo.tsx
new file mode 100644
index 00000000..174a4608
--- /dev/null
+++ b/demo/components/scale-fade-demo.tsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import { VStack, Box, Button, Text, ScaleFade } from "../../src";
+
+const ScaleFadeDemo = () => {
+ const [show, setShow] = useState(true);
+
+ return (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla purus
+ mi, aliquet sed augue ac, ullamcorper vulputate nisi.
+
+
+
+
+ );
+};
+
+export default ScaleFadeDemo;
diff --git a/demo/components/skeleton-demo.tsx b/demo/components/skeleton-demo.tsx
new file mode 100644
index 00000000..bbf0f348
--- /dev/null
+++ b/demo/components/skeleton-demo.tsx
@@ -0,0 +1,86 @@
+import { useEffect, useState } from "react";
+import {
+ Text,
+ Stack,
+ VStack,
+ Skeleton,
+ SkeletonCircle,
+ SkeletonText,
+ Radio,
+ Button,
+ Icon,
+} from "../../src";
+import DemoSection from "./demo-section";
+
+const SkeletonDemo = () => {
+ const [isLoaded, setIsLoaded] = useState(false);
+
+ useEffect(() => {
+ if (!isLoaded) {
+ const timer = setTimeout(() => {
+ setIsLoaded(true);
+ }, 2000);
+
+ return () => clearTimeout(timer);
+ }
+ }, [isLoaded]);
+
+ return (
+
+ }
+ onPress={() => setIsLoaded(false)}
+ >
+ Reload
+
+
+
+
+
+
+ Basic
+
+
+
+ Default Radio
+ Disabled Radio
+ Checked Radio
+ Error Radio
+
+
+
+
+
+
+
+
+
+
+ Basic
+
+
+
+
+
+
+ Circle
+
+
+
+
+
+
+ Text
+
+
+
+
+
+
+ );
+};
+
+export default SkeletonDemo;
diff --git a/demo/components/slide-demo.tsx b/demo/components/slide-demo.tsx
new file mode 100644
index 00000000..8f50bc4a
--- /dev/null
+++ b/demo/components/slide-demo.tsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import { VStack, Box, Button, Text, Slide } from "../../src";
+
+const SlideDemo = () => {
+ const [show, setShow] = useState(true);
+
+ return (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla purus
+ mi, aliquet sed augue ac, ullamcorper vulputate nisi.
+
+
+
+
+ );
+};
+
+export default SlideDemo;
diff --git a/demo/components/slide-fade-demo.tsx b/demo/components/slide-fade-demo.tsx
new file mode 100644
index 00000000..5876a4e2
--- /dev/null
+++ b/demo/components/slide-fade-demo.tsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import { VStack, Box, Button, Text, SlideFade } from "../../src";
+
+const SlideFadeDemo = () => {
+ const [show, setShow] = useState(true);
+
+ return (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla purus
+ mi, aliquet sed augue ac, ullamcorper vulputate nisi.
+
+
+
+
+ );
+};
+
+export default SlideFadeDemo;
diff --git a/demo/components/spinner-demo.tsx b/demo/components/spinner-demo.tsx
new file mode 100644
index 00000000..76bffd33
--- /dev/null
+++ b/demo/components/spinner-demo.tsx
@@ -0,0 +1,142 @@
+import { Text, Stack, VStack, Spinner, HStack, Box } from "../../src";
+import DemoSection from "./demo-section";
+
+const SpinnerDemo = () => {
+ return (
+
+
+
+
+
+ xs
+
+
+
+
+
+
+ s
+
+
+
+
+
+
+ m
+
+
+
+
+
+
+ l
+
+
+
+
+
+
+
+
+
+
+ Activity
+
+
+
+
+
+
+ Ball
+
+
+
+
+
+
+ Bar
+
+
+
+
+
+
+ Dot
+
+
+
+
+
+
+ Pacman
+
+
+
+
+
+
+ Pulse
+
+
+
+
+
+
+ Skype
+
+
+
+
+
+
+ Spinner
+
+
+
+
+
+
+ Wave
+
+
+
+
+
+
+
+
+
+
+ Primary
+
+ Start
+
+
+
+
+ Warning
+
+ Wait
+
+
+
+
+ Danger
+
+ Stop
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default SpinnerDemo;
diff --git a/docs/docs/components/feedback/Skeleton.mdx b/docs/docs/components/feedback/Skeleton.mdx
index e31003b4..11414934 100644
--- a/docs/docs/components/feedback/Skeleton.mdx
+++ b/docs/docs/components/feedback/Skeleton.mdx
@@ -159,4 +159,4 @@ Here is a list of additional properties that the `SkeletonText` component suppor
| ---------------- | -------- | ----------------------- | ------- | -------------------------------------------- |
| `spacing` | No | string \| number | `3` | Spacing between the individual skeleton text |
| `noOfLines` | No | number | `3` | Number of lines in the skeleton text |
-| `skeletonHeight` | No | number | `20` | Height of the each individual skeleton text |
+| `skeletonHeight` | No | number | `15` | Height of the each individual skeleton text |
diff --git a/docs/docs/components/transitions/Scale Fade.mdx b/docs/docs/components/transitions/Scale Fade.mdx
index 1745ef41..3c066374 100644
--- a/docs/docs/components/transitions/Scale Fade.mdx
+++ b/docs/docs/components/transitions/Scale Fade.mdx
@@ -79,4 +79,4 @@ The `ScaleFade` component also accepts the following additional props:
| Name | Required | Type | Default | Description |
| -------------- | -------- | -------------- | ------- | --------------------------------------- |
| `show` | Yes | boolean | | If `true`, the content will be visible. |
-| `initialScale` | No | number | `0.9` | The initial scale of the element. |
+| `initialScale` | No | number | `0.7` | The initial scale of the element. |
diff --git a/docs/docs/components/typography/Text.mdx b/docs/docs/components/typography/Text.mdx
index 7f9bade6..2f7fbc80 100644
--- a/docs/docs/components/typography/Text.mdx
+++ b/docs/docs/components/typography/Text.mdx
@@ -100,5 +100,5 @@ The `Text` component supports animation properties from the [Moti](https://moti.
| Name | Required | Type | Default | Description |
| --------------- | -------- | --------------------------------------------- | ------- | ----------------------------------------------------------------------- |
| `size` | No | PearlTheme.components.Text["sizes"] | | Size variant to use as defined in the active theme. |
-| `variant` | No | PearlTheme.components.Text["variants"] | `"p1"` | Typography variant to use as defined in the active theme. |
+| `variant` | No | PearlTheme.components.Text["variants"] | `"p3"` | Typography variant to use as defined in the active theme. |
| `scaleFontSize` | No | boolean | `true` | Whether to slightly scale the font size based on the screen dimensions. |
diff --git a/src/components/Atoms/Spinner/Spinner.tsx b/src/components/Atoms/Spinner/Spinner.tsx
index 29322aca..452b300d 100644
--- a/src/components/Atoms/Spinner/Spinner.tsx
+++ b/src/components/Atoms/Spinner/Spinner.tsx
@@ -16,15 +16,19 @@ import {
} from "../../../theme/src/types";
import { AccessibilityRoles } from "../../../hooks/utils/types";
import { StyleSheet, View } from "react-native";
-import BallIndicator from "./indicators/ball";
-import BarIndicator from "./indicators/bar";
-import DotIndicator from "./indicators/dot";
-import MaterialIndicator from "./indicators/material";
-import PacmanIndicator from "./indicators/pacman";
-import PulseIndicator from "./indicators/pulse";
-import SkypeIndicator from "./indicators/skype";
-import ActivityIndicator from "./indicators/activity";
-import WaveIndicator from "./indicators/wave";
+import BallIndicator, { BallIndicatorProps } from "./indicators/ball";
+import BarIndicator, { BarIndicatorProps } from "./indicators/bar";
+import DotIndicator, { DotIndicatorProps } from "./indicators/dot";
+import MaterialIndicator, {
+ MaterialIndicatorProps,
+} from "./indicators/material";
+import PacmanIndicator, { PacmanIndicatorProps } from "./indicators/pacman";
+import PulseIndicator, { PulseIndicatorProps } from "./indicators/pulse";
+import SkypeIndicator, { SkypeIndicatorProps } from "./indicators/skype";
+import ActivityIndicator, {
+ ActivityIndicatorProps,
+} from "./indicators/activity";
+import WaveIndicator, { WaveIndicatorProps } from "./indicators/wave";
import { useResponsiveProp } from "../../../hooks/useResponsiveProp";
import { useMotiWithStyleProps } from "../../../hooks/useMotiWithStyleProps";
@@ -97,7 +101,16 @@ const Spinner = React.memo(
animationDuration = 1200,
colorScheme = "primary",
...rest
- }: AtomComponentProps<"Spinner", BaseSpinnerProps, SpinnerStyleProps>,
+ }: AtomComponentProps<"Spinner", BaseSpinnerProps, SpinnerStyleProps> &
+ Omit &
+ Omit &
+ Omit &
+ Omit &
+ Omit &
+ Omit &
+ Omit &
+ Omit &
+ Omit,
ref: any
) => {
// Set default variant to "spinner"
diff --git a/src/components/Atoms/Stack/Stack.tsx b/src/components/Atoms/Stack/Stack.tsx
index 98463f8b..777f5120 100644
--- a/src/components/Atoms/Stack/Stack.tsx
+++ b/src/components/Atoms/Stack/Stack.tsx
@@ -60,7 +60,6 @@ const Stack = React.memo(
return (
= {
},
},
defaults: {
- variant: "p2",
+ variant: "p3",
},
};
diff --git a/src/components/Molecules/Badge/withBadge.tsx b/src/components/Molecules/Badge/withBadge.tsx
index 9512ce4d..f2d44c70 100644
--- a/src/components/Molecules/Badge/withBadge.tsx
+++ b/src/components/Molecules/Badge/withBadge.tsx
@@ -98,7 +98,7 @@ const withBadge =
// Render the wrapped component with the badge
return (
-
+
({
dampingRatio: 1,
duration: 100,
- easing: Easing.inOut,
type: "spring",
...(transition as any),
}),
@@ -40,7 +39,6 @@ const Fade = React.memo(
() => ({
dampingRatio: 1,
duration: 100,
- easing: Easing.inOut,
type: "spring",
...(exitTransition as any),
}),
diff --git a/src/components/atoms/scale-fade/scale-fade.tsx b/src/components/atoms/scale-fade/scale-fade.tsx
index 67db970b..0401c224 100644
--- a/src/components/atoms/scale-fade/scale-fade.tsx
+++ b/src/components/atoms/scale-fade/scale-fade.tsx
@@ -8,7 +8,7 @@ export type ScaleFadeProps = BoxProps & {
/**
* The initial scale of the element.
*
- * @default 0.9
+ * @default 0.7
*/
initialScale?: number;
};
@@ -22,7 +22,7 @@ const ScaleFade = React.memo(
{
children,
show,
- initialScale = 0.9,
+ initialScale = 0.7,
transition = {},
exitTransition = {},
...rest
diff --git a/src/components/atoms/skeleton/skeleton-text.tsx b/src/components/atoms/skeleton/skeleton-text.tsx
index 3283d797..330df94a 100644
--- a/src/components/atoms/skeleton/skeleton-text.tsx
+++ b/src/components/atoms/skeleton/skeleton-text.tsx
@@ -2,6 +2,7 @@ import React from "react";
import { FinalPearlTheme, ResponsiveValue } from "../../../theme/src/types";
import Skeleton, { SkeletonProps } from "./skeleton";
import Stack from "../stack/stack";
+import { useTheme } from "../../../hooks/useTheme";
export type SkeletonTextProps = SkeletonProps & {
/**
@@ -13,7 +14,7 @@ export type SkeletonTextProps = SkeletonProps & {
/**
* The height of each individual skeleton
*
- * @default 20
+ * @default 15
*/
skeletonHeight?: number;
/**
@@ -48,13 +49,31 @@ const SkeletonText = React.memo(
spacing = "3",
noOfLines = 3,
isLoaded = false,
- skeletonHeight = 20,
+ skeletonHeight = 15,
...rest
}: SkeletonTextProps,
ref: any
) => {
+ const { colorMode } = useTheme();
const numbers = React.useMemo(() => range(noOfLines), [noOfLines]);
+ const keyPrefix = React.useMemo(
+ () => `${colorMode}-${Math.random()}`,
+ [
+ isLoaded,
+ colorMode,
+ startColor,
+ endColor,
+ speed,
+ fadeDuration,
+ speed,
+ colorScheme,
+ skeletonHeight,
+ spacing,
+ rest,
+ ]
+ );
+
const getWidth = React.useCallback(
(index: number): any => {
if (noOfLines > 1) {
@@ -80,7 +99,7 @@ const SkeletonText = React.memo(
return (
= {
baseStyle: {
borderRadius: "m",
startColor: {
- light: "neutral.200",
+ light: "neutral.100",
dark: "neutral.700",
},
endColor: {
diff --git a/src/components/atoms/skeleton/skeleton.tsx b/src/components/atoms/skeleton/skeleton.tsx
index f642782f..481eafb7 100644
--- a/src/components/atoms/skeleton/skeleton.tsx
+++ b/src/components/atoms/skeleton/skeleton.tsx
@@ -4,6 +4,7 @@ import { ResponsiveValue, PaletteColors } from "../../../theme";
import { pearl } from "../../../pearl";
import { BoxStyleProps } from "../../../theme/src/style-functions";
import { View } from "react-native";
+import { useTheme } from "../../../hooks";
type BaseSkeletonProps = BoxProps & {
/**
@@ -47,7 +48,12 @@ const BaseSkeleton = React.memo(
}: BaseSkeletonProps,
ref: any
) => {
- const key = React.useMemo(() => Math.random(), [isLoaded]);
+ const { colorMode } = useTheme();
+
+ const key = React.useMemo(
+ () => `${colorMode}-${Math.random()}`,
+ [isLoaded, colorMode, startColor, endColor, speed, fadeDuration, rest]
+ );
if (isLoaded) {
return (
@@ -69,8 +75,8 @@ const BaseSkeleton = React.memo(
return (
{
switch (direction) {
case "bottom":
- return { translateY: -10000 };
+ return { translateY: -500 };
case "top":
- return { translateY: 10000 };
+ return { translateY: 500 };
case "right":
- return { translateX: -10000 };
+ return { translateX: -500 };
case "left":
- return { translateX: 10000 };
+ return { translateX: 500 };
default:
return {};
}
@@ -48,9 +48,10 @@ const Slide = React.memo(
switch (direction) {
case "bottom":
case "top":
+ return { translateY: 0 };
case "right":
case "left":
- return { translateX: 0, translateY: 0 };
+ return { translateX: 0 };
default:
return {};
}
@@ -59,13 +60,13 @@ const Slide = React.memo(
const exit = React.useMemo(() => {
switch (direction) {
case "bottom":
- return { translateY: -10000 };
+ return { translateY: -500 };
case "top":
- return { translateY: 10000 };
+ return { translateY: 500 };
case "right":
- return { translateX: -10000 };
+ return { translateX: -500 };
case "left":
- return { translateX: 10000 };
+ return { translateX: 500 };
default:
return {};
}
diff --git a/src/components/molecules/progress/progress.config.ts b/src/components/molecules/progress/progress.config.ts
index 276b8935..c9adc8c3 100644
--- a/src/components/molecules/progress/progress.config.ts
+++ b/src/components/molecules/progress/progress.config.ts
@@ -28,14 +28,14 @@ const ProgressConfig: MolecularComponentConfig = {
xs: {
container: (variant) => {
const baseStyle = {
- height: 10,
+ height: 5,
borderRadius: "s",
};
if (variant === "outline")
return {
...baseStyle,
- p: "0.5",
+ p: "0.25",
};
return baseStyle;
@@ -48,7 +48,7 @@ const ProgressConfig: MolecularComponentConfig = {
s: {
container: (variant) => {
const baseStyle = {
- height: 15,
+ height: 8,
borderRadius: "m",
};
@@ -68,14 +68,14 @@ const ProgressConfig: MolecularComponentConfig = {
m: {
container: (variant) => {
const baseStyle = {
- height: 20,
+ height: 12,
borderRadius: "m",
};
if (variant === "outline")
return {
...baseStyle,
- p: "1",
+ p: "0.75",
};
return baseStyle;
@@ -88,7 +88,7 @@ const ProgressConfig: MolecularComponentConfig = {
l: {
container: (variant) => {
const baseStyle = {
- height: 25,
+ height: 15,
borderRadius: "m",
};