Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

Commit 3770238

Browse files
authored
Merge pull request #96 from thepensionsregulator/all-pkg-docs
root docs updated
2 parents b848c7f + af84f2e commit 3770238

4 files changed

Lines changed: 54 additions & 39 deletions

File tree

packages/core/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
CORE COMPONENTS
1+
# @tpr/core [![npm version](https://flat.badgen.net/npm/v/@tpr/core)](https://www.npmjs.com/package/@tpr/core)
2+
3+
Core components for TPR apps.
4+
5+
## Installation
6+
7+
```sh
8+
npm install @tpr/core
9+
10+
# Peer Dependencies - Also Required
11+
npm install react react-dom @tpr/theming
12+
```

packages/forms/README.md

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,28 @@
1-
# `@tpr/forms`
1+
# @tpr/forms [![npm version](https://flat.badgen.net/npm/v/@tpr/forms)](https://www.npmjs.com/package/@tpr/forms)
22

3-
Forms will adapt react-final-forms library and will expose helper functions to simplify form components delivery.
3+
Form components for TPR apps.
44

5-
## Form Functions
5+
## Installation
66

7-
### ✅ validate()
7+
```sh
8+
npm install @tpr/forms
89

9-
```ts
10-
validate(formFields: FieldProps[]) => (formValues) => errors object
10+
# Peer Dependencies - Also Required
11+
npm install react react-dom @tpr/theming
1112
```
1213

13-
### ✅ renderFields()
14+
## Helpers
1415

15-
```ts
16-
renderFields(fields: FieldProps[]): ReactElement
17-
```
18-
19-
## Form Components
20-
21-
### ✅ Text
22-
23-
- should have a label
24-
- label should have a state if it is an optional input
25-
- should take custom validation function
26-
- should have a 100% or custom width option
27-
28-
### ✅ Radio Buttons Group
29-
30-
- if 2 options than should display as row list
31-
- if 3 or more options should display in column list
32-
- config to be able to select a number of options
33-
34-
### ✅ Checkbox
35-
36-
### ✅ Select + Search
37-
38-
- should have a dropdown with ability to select a single option
39-
- shoult take onSelect handler
16+
- `validate: (fields: FieldProps[]) => (formValues) => errors object`: validate function helper for `react-final-form` Form component.
17+
- `renderFields: (fields: FieldProps[]) => ReactElement[]`: renders a vertical list of fields from the fields array. Has to be used as a child of Form component.
4018

41-
### ✅ Textarea
19+
## Components
4220

43-
- should have max length prop
44-
- should show chars left when typing
21+
- Checkbox
22+
- Date
23+
- Hidden input
24+
- Input
25+
- Number
26+
- Radio
27+
- Select
28+
- Text

packages/icons/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
# `@tpr/icons`
1+
# @tpr/icons [![npm version](https://flat.badgen.net/npm/v/@tpr/icons)](https://www.npmjs.com/package/@tpr/icons)
22

3-
> TODO: description
3+
Icon components for TPR apps.
4+
5+
## Installation
6+
7+
```sh
8+
npm install @tpr/icons
9+
10+
# Peer Dependencies - Also Required
11+
npm install react react-dom @tpr/theming
12+
```

packages/layout/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
LAYOUT COMPONENTS
1+
# @tpr/layout [![npm version](https://flat.badgen.net/npm/v/@tpr/layout)](https://www.npmjs.com/package/@tpr/layout)
2+
3+
Layout components for TPR apps.
4+
5+
## Installation
6+
7+
```sh
8+
npm install @tpr/layout
9+
10+
# Peer Dependencies - Also Required
11+
npm install react react-dom @tpr/theming
12+
```

0 commit comments

Comments
 (0)