@socotra/ec-react-components 2.0.1-alpha.1 → 2.0.1-alpha.3

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
@@ -8,7 +8,7 @@ This library is styled via [tailwindcss](https://tailwindcss.com/) and [shadcn/u
8
8
  - **Repo Path**: `packages/components`
9
9
  - **Install**:
10
10
  ```sh
11
- npm i @socotra/ec-react-components
11
+ npm i @socotra/ec-react-components @tailwindcss/container-queries
12
12
  ```
13
13
  - **Usage**:
14
14
 
@@ -19,13 +19,32 @@ This library is styled via [tailwindcss](https://tailwindcss.com/) and [shadcn/u
19
19
  import { MyComponent } from '@socotra/ec-react-components';
20
20
  ```
21
21
 
22
- ### Customization
22
+ - Add the plugin to your `tailwind.config.js` file along with the content path:
23
+
24
+ ```js
25
+ // tailwind.config.js
26
+ module.exports = {
27
+ content: [
28
+ // ...
29
+ './node_modules/@socotra/ec-react-components/dist/**/*.js',
30
+ ]
31
+ theme: {
32
+ // ...
33
+ },
34
+ plugins: [
35
+ require('@tailwindcss/container-queries'),
36
+ // ...
37
+ ],
38
+ };
39
+ ```
40
+
41
+ ## Customization
23
42
 
24
43
  As this library is styled via shadcn components and tailwind, customization can be achieved by installing shadcn in your project. Follow the installation guide from [shadcn](https://ui.shadcn.com/docs/installation) and adjust your theme using the [theme creator](https://ui.shadcn.com/themes).
25
44
 
26
45
  Once you install shadcn, or if you are using it already, **delete the style.css import** to avoid style collisions
27
46
 
28
- ### Running the Project
47
+ ### Running the Project Locally
29
48
 
30
49
  To build the package:
31
50
 
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
8
8
  * AccountForm is a form for creating or updating an account. It accepts a resolved data model, custom data types, and an optional account object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
9
9
  */
10
10
  export declare const AccountForm: {
11
- ({ accountsModel, accountType, dataTypes, handleSubmit, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
11
+ ({ accountsModel, accountType, dataTypes, disabled, handleSubmit, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
12
12
  displayName: string;
13
13
  };
14
14
 
@@ -34,6 +34,10 @@ declare type Props = {
34
34
  * The function to call when the form is submitted. It will create an AccountCreateRequest or AccountUpdateRequest based on the form data
35
35
  */
36
36
  handleSubmit: (data: AccountRequest) => void;
37
+ /**
38
+ * Disables the form
39
+ */
40
+ disabled?: boolean;
37
41
  /**
38
42
  * The account object to put the form in update mode
39
43
  */