@krasnoff/react-accessibility-component 1.0.4 → 1.0.5

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
@@ -23,20 +23,24 @@ yarn add react-accessibility-component
23
23
  Import and use the component in your React application:
24
24
 
25
25
  ```
26
- import { AccessibilityComponent } from 'react-accessibility-component'
26
+ import '@krasnoff/react-accessibility-component/dist/react-accessibility-component.css';
27
+ import { AccessibilityComponent as AccessibilityComponentBase } from "@krasnoff/react-accessibility-component";
28
+
29
+ const AccessibilityComponent = AccessibilityComponentBase as React.FC<React.PropsWithChildren>;
27
30
 
28
31
  function App() {
29
32
  return (
30
- <AccessibilityComponent>
31
- <h1>Vite + React to NPM repository</h1>
32
- </AccessibilityComponent>
33
+ <>
34
+ <h1>Vite + React to NPM repository</h1>
35
+ </AccessibilityComponent />
36
+ </>
33
37
  )
34
38
  }
35
39
 
36
40
  export default App
37
41
  ```
38
42
 
39
- Now add the following css file to the `index.html` file in your project:
43
+ Alternatively, you can add the following css file to the `index.html` file in your project instead of importing it in the App component:
40
44
 
41
45
  ```
42
46
  <link rel="stylesheet" href="node_modules/react-accessibility-component/dist/react-accessibility-component.css" />
package/dist/README.md CHANGED
@@ -23,20 +23,24 @@ yarn add react-accessibility-component
23
23
  Import and use the component in your React application:
24
24
 
25
25
  ```
26
- import { AccessibilityComponent } from 'react-accessibility-component'
26
+ import '@krasnoff/react-accessibility-component/dist/react-accessibility-component.css';
27
+ import { AccessibilityComponent as AccessibilityComponentBase } from "@krasnoff/react-accessibility-component";
28
+
29
+ const AccessibilityComponent = AccessibilityComponentBase as React.FC<React.PropsWithChildren>;
27
30
 
28
31
  function App() {
29
32
  return (
30
- <AccessibilityComponent>
31
- <h1>Vite + React to NPM repository</h1>
32
- </AccessibilityComponent>
33
+ <>
34
+ <h1>Vite + React to NPM repository</h1>
35
+ </AccessibilityComponent />
36
+ </>
33
37
  )
34
38
  }
35
39
 
36
40
  export default App
37
41
  ```
38
42
 
39
- Now add the following css file to the `index.html` file in your project:
43
+ Alternatively, you can add the following css file to the `index.html` file in your project instead of importing it in the App component:
40
44
 
41
45
  ```
42
46
  <link rel="stylesheet" href="node_modules/react-accessibility-component/dist/react-accessibility-component.css" />
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@krasnoff/react-accessibility-component",
3
3
  "private": false,
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "description": "A React component library focused on accessibility, built with Vite and TypeScript.",
6
6
  "repository": {
7
7
  "type": "git",