New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/text-area

Package Overview
Dependencies
Maintainers
5
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/text-area - npm Package Compare versions

Comparing version 0.9.1 to 0.10.0

dist/declarations/src/index.d.ts

25

package.json
{
"name": "@govuk-react/text-area",
"version": "0.9.1",
"version": "0.10.0",
"dependencies": {
"@govuk-react/constants": "^0.9.1",
"@govuk-react/error-text": "^0.9.1",
"@govuk-react/hint-text": "^0.9.1",
"@govuk-react/hoc": "^0.9.1",
"@govuk-react/label": "^0.9.1",
"@govuk-react/label-text": "^0.9.1",
"@govuk-react/constants": "^0.10.0",
"@govuk-react/error-text": "^0.10.0",
"@govuk-react/hint-text": "^0.10.0",
"@govuk-react/label": "^0.10.0",
"@govuk-react/label-text": "^0.10.0",
"govuk-colours": "^1.1.0"

@@ -18,9 +17,8 @@ },

"scripts": {
"build": "yarn build:lib && yarn build:es",
"build:lib": "rimraf lib && babel src -x .js,jsx,.ts,.tsx -d lib --source-maps --config-file ../../babel.config.js",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -x .js,jsx,.ts,.tsx -d es --source-maps --config-file ../../babel.config.js",
"docs": "doc-component ./lib/index.js ./README.md"
"docs": "doc-component ./src/index.tsx ./README.md",
"version": "yarn version"
},
"main": "lib/index.js",
"module": "es/index.js",
"main": "dist/govuk-react-text-area.cjs.js",
"module": "dist/govuk-react-text-area.esm.js",
"source": "src/index.tsx",
"author": "Alasdair McLeay",

@@ -30,3 +28,2 @@ "license": "MIT",

"description": "Styled textarea supporting additional parameters via props.",
"private": false,
"publishConfig": {

@@ -33,0 +30,0 @@ "access": "public"

@@ -10,49 +10,18 @@ TextArea

### Usage
Use the textarea component when you need to let users enter an amount of text that’s longer than a single line.
Simple
- https://govuk-react.github.io/govuk-react/?path=/docs/text-area
- https://design-system.service.gov.uk/components/textarea/
```jsx
import { TextArea } from 'govuk-react'
<TextArea name="group1">Description of what you saw</TextArea>
```
TextArea with hint text
```jsx
<TextArea name="group1" hint={['Enter as many words as you like']}>
Description of what you saw
</TextArea>
```
TextArea with hint text & error
```jsx
const meta = {
touched: true,
error: 'Example',
};
<TextArea
name="group1"
hint={['Enter as many words as you like']}
meta={meta}
>
Description of what you saw
</TextArea>
```
### References:
- https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/textarea
### Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
`children` | true | `````` | node |
`hint` | | ```undefined``` | string |
`input` | | ```{}``` | shape[object Object] |
`meta` | | ```{}``` | shape[object Object] |
`error` | | `````` | boolean | Apply error state styling to the component
`hint` | | ```undefined``` | ReactNode |
`input` | | ```{}``` | TextareaHTMLAttributes<HTMLTextAreaElement> |
`margin` | | `````` | Margin | Margin[] |
`mb` | | `````` | string | number |
`meta` | | ```{}``` | { error?: string | string[]; touched?: boolean; } |
`padding` | | `````` | Padding | Padding[] |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc