@bigbinary/neetoui-rn 0.0.10 → 0.0.11

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.
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { flexbox, space, border, buttonStyle } from "styled-system";
3
3
  import styled from "styled-components/native";
4
+ import propTypes from "@styled-system/prop-types";
5
+ import PropTypes from "prop-types";
4
6
 
5
7
  export const TouchableOpacity = styled.TouchableOpacity`
6
8
  ${flexbox}
@@ -18,3 +20,11 @@ Button.defaultProps = {
18
20
  p: 15,
19
21
  alignItems: "center",
20
22
  };
23
+
24
+ Button.propTypes = {
25
+ ...propTypes.flexbox,
26
+ ...propTypes.space,
27
+ ...propTypes.border,
28
+ ...propTypes.buttonStyle,
29
+ children: PropTypes.node.isRequired,
30
+ };
@@ -1,7 +1,10 @@
1
+ import * as React from "react";
1
2
  import { flexbox, space, border, color, layout } from "styled-system";
2
3
  import styled from "styled-components/native";
4
+ import propTypes from "@styled-system/prop-types";
5
+ import PropTypes from "prop-types";
3
6
 
4
- export const Container = styled.View`
7
+ const View = styled.View`
5
8
  ${flexbox}
6
9
  ${space}
7
10
  ${border}
@@ -9,6 +12,19 @@ export const Container = styled.View`
9
12
  ${layout}
10
13
  `;
11
14
 
15
+ export const Container = ({ children, ...rest }) => {
16
+ return <View {...rest}>{children}</View>;
17
+ };
18
+
12
19
  Container.defaultProps = {
13
20
  color: "background.default",
14
21
  };
22
+
23
+ Container.propTypes = {
24
+ ...propTypes.flexbox,
25
+ ...propTypes.space,
26
+ ...propTypes.border,
27
+ ...propTypes.color,
28
+ ...propTypes.layout,
29
+ children: PropTypes.node.isRequired,
30
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Body = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Body.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Callout = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Callout.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Caption1 = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Caption1.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Caption2 = ({ children, ...rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Caption2.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Headline = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Headline.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const LargeTitle = ({ children, ...rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ LargeTitle.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Title1 = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Title1.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Title2 = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Title2.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,4 +1,6 @@
1
1
  import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+
2
4
  import { Typography } from "./Typography";
3
5
 
4
6
  // @component-group Typography Components
@@ -33,3 +35,8 @@ export const Title3 = ({ children, rest }) => {
33
35
  </Typography>
34
36
  );
35
37
  };
38
+
39
+ Title3.propTypes = {
40
+ ...Typography.propTypes,
41
+ children: PropTypes.node.isRequired,
42
+ };
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import styled from "styled-components/native";
3
3
  import { space, layout, typography, color, textStyle } from "styled-system";
4
+ import propTypes from "@styled-system/prop-types";
5
+ import PropTypes from "prop-types";
4
6
 
5
7
  export const Text = styled.Text`
6
8
  ${space}
@@ -53,3 +55,12 @@ export const Text = styled.Text`
53
55
  export const Typography = ({ children, ...rest }) => {
54
56
  return <Text {...rest}>{children}</Text>;
55
57
  };
58
+
59
+ Typography.propTypes = {
60
+ ...propTypes.space,
61
+ ...propTypes.layout,
62
+ ...propTypes.typography,
63
+ ...propTypes.color,
64
+ ...propTypes.textStyle,
65
+ children: PropTypes.node.isRequired,
66
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neetoui-rn",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "main": "lib/index.js",
5
5
  "author": "BigBinary",
6
6
  "license": "MIT",
@@ -41,7 +41,9 @@
41
41
  ]
42
42
  },
43
43
  "peerDependencies": {},
44
- "dependencies": {},
44
+ "dependencies": {
45
+ "@styled-system/prop-types": "^5.1.5"
46
+ },
45
47
  "devDependencies": {
46
48
  "@babel/core": "^7.12.9",
47
49
  "@babel/runtime": "^7.12.5",