react-restyle-components 0.2.20 → 0.2.22

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 CHANGED
@@ -22,6 +22,8 @@ Github: www.github.com/appasaheb4 <br />
22
22
  Website: www.tech-abl.com
23
23
  ☆━━━━━━━━━━━━━━━━━━━☆☆━━━━━━━━━━━━━━━━━━━☆
24
24
 
25
+ ### If you use pdf components ref : [a relative link](PDF-README.md)
26
+
25
27
  ## Contributes / Support
26
28
 
27
29
  1. More content here : https://www.youtube.com/@techabl
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
package/lib/src/App.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import React, { useState } from 'react';
2
2
  import './App.css';
3
- import { ColorPickerModal, } from './core-components';
3
+ import { ColorPickerModal, PdfMedium, } from './core-components';
4
4
  function App() {
5
5
  const [color, setColor] = useState('#aabbcc');
6
6
  return (React.createElement("div", { className: "flex flex-col gap-4 p-4" },
7
7
  React.createElement("p", { style: { margin: '0 0 10px 0' } }, "Autocomplete Comp."),
8
- React.createElement(ColorPickerModal, { color: color, onChange: setColor })));
8
+ React.createElement(ColorPickerModal, { color: color, onChange: setColor }),
9
+ React.createElement(PdfMedium, null, "hi")));
9
10
  }
10
11
  export default App;
@@ -11,10 +11,10 @@ interface PdfTextProps {
11
11
  fixed?: boolean;
12
12
  children?: React.ReactNode;
13
13
  }
14
- export declare const PdfHeading: ({ fontWeight, fontSize, style, children, }: PdfTextProps) => React.JSX.Element;
15
- export declare const PdfSubHeading: ({ fontWeight, fontSize, style, children, }: PdfTextProps) => React.JSX.Element;
16
- export declare const PdfMedium: ({ fontWeight, fontSize, textAlign, style, children, }: PdfTextProps) => React.JSX.Element;
17
- export declare const PdfRegular: ({ fontWeight, fontSize, textAlign, style, children, }: PdfTextProps) => React.JSX.Element;
18
- export declare const PdfSmall: ({ fontSize, fontWeight, textAlign, lineHeight, fixed, style, children, }: PdfTextProps) => React.JSX.Element;
14
+ export declare const PdfHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
15
+ export declare const PdfSubHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
16
+ export declare const PdfMedium: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
17
+ export declare const PdfRegular: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
18
+ export declare const PdfSmall: ({ fontSize, fontFamily, fontWeight, textAlign, lineHeight, fixed, style, children, }: PdfTextProps) => React.JSX.Element;
19
19
  export declare const PdfPageNumber: ({ style, bottom }: PdfTextProps) => React.JSX.Element;
20
20
  export {};
@@ -4,7 +4,7 @@ Font.register({
4
4
  family: 'ArimaBold',
5
5
  fonts: [
6
6
  {
7
- src: '../../../library/assets/fonts/arima/arima-bold.ttf',
7
+ src: require('/src/library/assets/fonts/arima/arima-bold.ttf'),
8
8
  fontStyle: 'normal',
9
9
  fontWeight: 'bold',
10
10
  },
@@ -12,41 +12,46 @@ Font.register({
12
12
  });
13
13
  Font.register({
14
14
  family: 'ArimaRegular',
15
- src: '../../../library/assets/fonts/arima/arima-regular.ttf',
15
+ src: require('/src/library/assets/fonts/arima/arima-regular.ttf'),
16
16
  });
17
- export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, style, children, }) => {
17
+ export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, fontFamily = 'ArimaRegular', style, children, }) => {
18
18
  return (React.createElement(Text, { style: {
19
19
  fontWeight: fontWeight,
20
20
  fontSize: fontSize,
21
+ fontFamily: fontFamily,
21
22
  ...style,
22
23
  } }, children));
23
24
  };
24
- export const PdfSubHeading = ({ fontWeight = 'bold', fontSize = 20, style, children, }) => {
25
+ export const PdfSubHeading = ({ fontWeight = 'bold', fontSize = 20, fontFamily = 'ArimaRegular', style, children, }) => {
25
26
  return (React.createElement(Text, { style: {
26
27
  fontWeight: fontWeight,
27
28
  fontSize: fontSize,
29
+ fontFamily: fontFamily,
28
30
  ...style,
29
31
  } }, children));
30
32
  };
31
- export const PdfMedium = ({ fontWeight = 'medium', fontSize = 16, textAlign = 'left', style, children, }) => {
33
+ export const PdfMedium = ({ fontWeight = 'medium', fontSize = 16, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
32
34
  return (React.createElement(Text, { style: {
33
35
  fontWeight: fontWeight,
34
36
  fontSize: fontSize,
37
+ fontFamily: fontFamily,
35
38
  textAlign: textAlign,
36
39
  ...style,
37
40
  } }, children));
38
41
  };
39
- export const PdfRegular = ({ fontWeight = 'normal', fontSize = 12, textAlign = 'left', style, children, }) => {
42
+ export const PdfRegular = ({ fontWeight = 'normal', fontSize = 12, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
40
43
  return (React.createElement(Text, { style: {
41
44
  fontWeight: fontWeight,
42
45
  fontSize: fontSize,
46
+ fontFamily: fontFamily,
43
47
  textAlign: textAlign,
44
48
  ...style,
45
49
  } }, children));
46
50
  };
47
- export const PdfSmall = ({ fontSize = 10, fontWeight = 'normal', textAlign = 'left', lineHeight = 0, fixed = false, style, children, }) => {
51
+ export const PdfSmall = ({ fontSize = 10, fontFamily = 'ArimaRegular', fontWeight = 'normal', textAlign = 'left', lineHeight = 0, fixed = false, style, children, }) => {
48
52
  return (React.createElement(Text, { style: {
49
53
  fontSize: fontSize,
54
+ fontFamily: fontFamily,
50
55
  fontWeight: fontWeight,
51
56
  lineHeight: lineHeight,
52
57
  textAlign: textAlign,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {