@autobusal/common 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Loading/Loading.tsx +17 -8
- package/Meta.tsx +1 -1
- package/Modal/Modal.tsx +2 -2
- package/package.json +1 -1
package/Loading/Loading.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpinnerRoundFilled, SpinnerCircularFixed } from 'spinners-react';
|
|
2
2
|
import { useSystemTheme } from '@autobusal/providers';
|
|
3
|
-
import Skeleton from 'react-loading-skeleton';
|
|
3
|
+
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
|
4
4
|
import { ContainerGeneral
|
|
5
5
|
// , ContainerInline
|
|
6
6
|
, ContainerParagraph } from './styles';
|
|
@@ -47,10 +47,19 @@ interface ParagraphProps {
|
|
|
47
47
|
count?: number
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export const Paragraph = ({ count = 3 }: ParagraphProps): JSX.Element =>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
export const Paragraph = ({ count = 3 }: ParagraphProps): JSX.Element => {
|
|
51
|
+
const theme = useSystemTheme();
|
|
52
|
+
|
|
53
|
+
const baseColor = theme === 'light' ? '#EBEBEB' : "#202020";
|
|
54
|
+
const highlightColor = theme === 'light' ? '#F5F5F5' : '#444444';
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<SkeletonTheme baseColor={ baseColor } highlightColor={ highlightColor }>
|
|
58
|
+
<ContainerParagraph>
|
|
59
|
+
<Skeleton count={ count - 1 } /> <br />
|
|
60
|
+
<Skeleton count={ count + 1 } /> <br />
|
|
61
|
+
<Skeleton count={ count } />
|
|
62
|
+
</ContainerParagraph>
|
|
63
|
+
</SkeletonTheme>
|
|
64
|
+
);
|
|
65
|
+
};
|
package/Meta.tsx
CHANGED
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
title: string
|
|
5
5
|
keywords?: string
|
|
6
6
|
description?: string
|
|
7
|
-
children: JSX.Element | JSX.Element[] | string | null | false
|
|
7
|
+
children: JSX.Element | JSX.Element[] | string | null | false | boolean
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const Meta = ({ title, keywords, description, children }: Props): JSX.Element => (
|
package/Modal/Modal.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AiOutlineClose } from 'react-icons/ai';
|
|
2
|
-
|
|
2
|
+
import { useOverflow } from '@autobusal/hooks';
|
|
3
3
|
import { Paragraph } from '../index';
|
|
4
4
|
import { Background, Container, Title, ButtonClose } from './styles';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ interface Props {
|
|
|
13
13
|
|
|
14
14
|
const Modal = ({ loading, width, title, content, onClose }: Props): JSX.Element => {
|
|
15
15
|
// hide the scroll
|
|
16
|
-
|
|
16
|
+
useOverflow();
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|