@nextelco/common-ui 1.4.97 → 1.4.98

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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './Error.scss';
3
+ interface ErrorProps {
4
+ messages: string[];
5
+ }
6
+ declare const Error: React.FC<ErrorProps>;
7
+ export default Error;
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ComponentProps } from 'react';
3
+ import Error from './Error';
4
+ type StoryProps = ComponentProps<typeof Error>;
5
+ declare const meta: Meta<StoryProps>;
6
+ export default meta;
7
+ type Story = StoryObj<typeof meta>;
8
+ export declare const Default: Story;
9
+ export declare const MultipleMessages: Story;
10
+ export declare const NoMessages: Story;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { AxiosInstance } from 'axios';
3
+ export declare const ApiServiceProvider: React.FC<{
4
+ children: React.ReactNode;
5
+ baseURL: string;
6
+ token?: string;
7
+ }>;
8
+ export declare const useAxiosInstance: () => AxiosInstance;
@@ -0,0 +1,14 @@
1
+ type AllowedMethods = 'get' | 'post' | 'put' | 'delete' | 'patch';
2
+ interface RequestOptions {
3
+ method: AllowedMethods;
4
+ url: string;
5
+ body?: object | FormData;
6
+ params?: object;
7
+ responseType?: 'blob';
8
+ }
9
+ declare const useApiService: () => {
10
+ request: (options: RequestOptions) => Promise<any | null>;
11
+ errors: string | null;
12
+ loading: boolean;
13
+ };
14
+ export default useApiService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextelco/common-ui",
3
- "version": "1.4.97",
3
+ "version": "1.4.98",
4
4
  "description": "",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/types/index.d.ts",