react-restyle-components 0.2.19 → 0.2.21
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
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;
|
|
@@ -3,7 +3,7 @@ import { Style } from '@react-pdf/types';
|
|
|
3
3
|
interface PdfTextProps {
|
|
4
4
|
fontWeight?: 'bold' | 'medium' | 'normal';
|
|
5
5
|
fontSize?: number;
|
|
6
|
-
fontFamily?: 'ArimaRegular' | string;
|
|
6
|
+
fontFamily?: 'ArimaRegular' | 'ArimaBold' | string;
|
|
7
7
|
textAlign?: 'center' | 'left' | 'right';
|
|
8
8
|
style?: Style | Style[];
|
|
9
9
|
lineHeight?: number;
|
|
@@ -4,7 +4,7 @@ Font.register({
|
|
|
4
4
|
family: 'ArimaBold',
|
|
5
5
|
fonts: [
|
|
6
6
|
{
|
|
7
|
-
src: '
|
|
7
|
+
src: require('/src/library/assets/fonts/arima/arima-bold.ttf'),
|
|
8
8
|
fontStyle: 'normal',
|
|
9
9
|
fontWeight: 'bold',
|
|
10
10
|
},
|
|
@@ -12,7 +12,7 @@ Font.register({
|
|
|
12
12
|
});
|
|
13
13
|
Font.register({
|
|
14
14
|
family: 'ArimaRegular',
|
|
15
|
-
src: '
|
|
15
|
+
src: require('/src/library/assets/fonts/arima/arima-regular.ttf'),
|
|
16
16
|
});
|
|
17
17
|
export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, fontFamily = 'ArimaRegular', style, children, }) => {
|
|
18
18
|
return (React.createElement(Text, { style: {
|