@cronocode/react-box 1.5.5 → 1.5.6

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/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # React box
2
+
3
+ This is a react base component which will reduce considerably necessity to write css code.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Installation
8
+
9
+ ```
10
+ npm install @cronocode/react-box
11
+ ```
12
+
13
+ 2. Import styles
14
+
15
+ ```
16
+ import "@cronocode/react-box/styles.css";
17
+ ```
18
+
19
+ OR
20
+
21
+ ```
22
+ @import "@cronocode/react-box/styles.css";
23
+ ```
24
+
25
+ 3. Use component
26
+
27
+ Sizes are divided to `4`
28
+ `padding={3}` means `1rem/4 => 0.75rem`
29
+
30
+ In the example below is creating a box with `maring: 0.5rem` and `padding: 1.75rem`
31
+
32
+ Root `font-size` is set to `16px`
33
+
34
+ ```
35
+ import Box from "@cronocode/react-box";
36
+
37
+ export default function Component(props: Props) {
38
+ return (
39
+ <Box className="custom-class" m={2} p={7}>
40
+ basic example
41
+ </Box>
42
+ );
43
+ }
44
+ ```
45
+
46
+ ## Components
47
+
48
+ - **Box** - base component with a tons of props
49
+
50
+ ```
51
+ import Box from "@cronocode/react-box";
52
+ ```
53
+
54
+ <br/>
55
+
56
+ ### Alias-shortcuts components
57
+
58
+ - **Flex** - this is a `Box` component with `display: flex` style
59
+
60
+ ```
61
+ import Flex from "@cronocode/react-box/components/flex";
62
+ ```
63
+
64
+ - **Button** - this is a `Box` component with html tag `button` and `onClick` prop
65
+
66
+ ```
67
+ import Button from "@cronocode/react-box/components/button";
68
+ ```
69
+
70
+ - **Textbox**
71
+
72
+ ```
73
+ import Textbox from "@cronocode/react-box/components/textbox";
74
+ ```
75
+
76
+ - **Tooltip** - this is useful when you need a position absolute and the parent has overflow hidden.
77
+
78
+ ```
79
+ import Tooltip from "@cronocode/react-box/components/tooltip";
80
+ ```
81
+
82
+ ## Theme variables
83
+
84
+ ```
85
+ --borderColor: black;
86
+ --outlineColor: black;
87
+ --lineHeight: 1.2;
88
+ --fontSize: 14px;
89
+ --transitionTime: 0.25s;
90
+ ```
@@ -1 +1 @@
1
- "use strict";const t={base:"b67",rotate0:"b68",rotateH0:"b69",hovertrue:"_h",rotate90:"b7a",rotateH90:"b7b",rotate180:"b7c",rotateH180:"b7d",rotate270:"b7e",rotateH270:"b7f",flipxAxis:"b7g",flipHxAxis:"b7h",flipyAxis:"b7i",flipHyAxis:"b7j",rotateF0:"b7k",focustrue:"_f",rotateF90:"b7l",rotateF180:"b7m",rotateF270:"b7n",flipFxAxis:"b7o",flipFyAxis:"b7p",rotateA0:"b7q",rotateA90:"b7r",rotateA180:"b7s",rotateA270:"b7t",flipAxAxis:"b7u",flipAyAxis:"b7v"};exports.classes=t;
1
+ "use strict";const t={base:"a",rotate0:"b",rotateH0:"c",hovertrue:"_h",rotate90:"d",rotateH90:"e",rotate180:"f",rotateH180:"g",rotate270:"h",rotateH270:"i",flipxAxis:"j",flipHxAxis:"k",flipyAxis:"l",flipHyAxis:"m",rotateF0:"n",focustrue:"_f",rotateF90:"o",rotateF180:"p",rotateF270:"q",flipFxAxis:"r",flipFyAxis:"s",rotateA0:"t",rotateA90:"u",rotateA180:"v",rotateA270:"w",flipAxAxis:"x",flipAyAxis:"y"};exports.classes=t;
@@ -1,4 +1,4 @@
1
- const t = { base: "b67", rotate0: "b68", rotateH0: "b69", hovertrue: "_h", rotate90: "b7a", rotateH90: "b7b", rotate180: "b7c", rotateH180: "b7d", rotate270: "b7e", rotateH270: "b7f", flipxAxis: "b7g", flipHxAxis: "b7h", flipyAxis: "b7i", flipHyAxis: "b7j", rotateF0: "b7k", focustrue: "_f", rotateF90: "b7l", rotateF180: "b7m", rotateF270: "b7n", flipFxAxis: "b7o", flipFyAxis: "b7p", rotateA0: "b7q", rotateA90: "b7r", rotateA180: "b7s", rotateA270: "b7t", flipAxAxis: "b7u", flipAyAxis: "b7v" };
1
+ const t = { base: "a", rotate0: "b", rotateH0: "c", hovertrue: "_h", rotate90: "d", rotateH90: "e", rotate180: "f", rotateH180: "g", rotate270: "h", rotateH270: "i", flipxAxis: "j", flipHxAxis: "k", flipyAxis: "l", flipHyAxis: "m", rotateF0: "n", focustrue: "_f", rotateF90: "o", rotateF180: "p", rotateF270: "q", flipFxAxis: "r", flipFyAxis: "s", rotateA0: "t", rotateA90: "u", rotateA180: "v", rotateA270: "w", flipAxAxis: "x", flipAyAxis: "y" };
2
2
  export {
3
3
  t as c
4
4
  };