diff --git a/README.md b/README.md index 6035b45afa..059680cd5d 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,17 @@ Please refer to the [component demo pages](https://design-system.digital.mod.uk/ ### Installation -To install and save to your projects package.json dependencies, run: +To install and save to your project's package.json dependencies, run: ``` # with npm -npm install @defencedigital/fonts @defencedigital/react-component-library +npm install @defencedigital/fonts @defencedigital/react-component-library styled-components formik # ...or with yarn -yarn add @defencedigital/fonts @defencedigital/react-component-library +yarn add @defencedigital/fonts @defencedigital/react-component-library styled-components formik ``` -Note: As of `2.16.0` the [`styled-components`](https://github.com/styled-components/styled-components) package is now a required [peerDependency](https://nodejs.org/en/blog/npm/peer-dependencies/). +Note: [`styled-components`](https://styled-components.com/) and [`formik`](https://formik.org/) are required [peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) and are installed with the above commands. ### Quick start diff --git a/packages/cra-template-defencedigital/template.json b/packages/cra-template-defencedigital/template.json index dddc264485..63a24e2389 100644 --- a/packages/cra-template-defencedigital/template.json +++ b/packages/cra-template-defencedigital/template.json @@ -20,6 +20,7 @@ "@testing-library/jest-dom": "^5.5.0", "@testing-library/react": "^10.0.4", "@testing-library/user-event": "^10.1.0", + "formik": "^2.2.9", "jest-canvas-mock": "^2.3.0", "typescript": "^3.8.0", "@graphql-codegen/cli": "^1.8.3", diff --git a/packages/react-component-library/README.md b/packages/react-component-library/README.md index 5bd6bea8b6..c146ee2635 100755 --- a/packages/react-component-library/README.md +++ b/packages/react-component-library/README.md @@ -6,15 +6,17 @@ A collection of React components written for Defence Digital web applications. The Defence Digital React Component Library is available as an [NPM package](https://www.npmjs.com/package/@defencedigital/react-component-library). -``` +To install it, run the relevant command for your package manager: + +```shell // npm -npm install @defencedigital/fonts @defencedigital/react-component-library +npm install @defencedigital/fonts @defencedigital/react-component-library styled-components formik // yarn -yarn add @defencedigital/fonts @defencedigital/react-component-library +yarn add @defencedigital/fonts @defencedigital/react-component-library styled-components formik ``` -NOTE: As of `2.16.0` the [`styled-components`](https://github.com/styled-components/styled-components) package is now a required [peerDependency](https://nodejs.org/en/blog/npm/peer-dependencies/). +Note: [`styled-components`](https://styled-components.com/) and [`formik`](https://formik.org/) are required [peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/) and are installed with the above commands. ## Usage diff --git a/packages/react-component-library/package.json b/packages/react-component-library/package.json index bff7cf3a5f..2109977f71 100644 --- a/packages/react-component-library/package.json +++ b/packages/react-component-library/package.json @@ -193,6 +193,7 @@ "styled-theming": "^2.2.0" }, "peerDependencies": { + "formik": "^2 || ^3", "styled-components": ">= 5" } }