Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 4fc35d2

Browse files
authored
Merge branch 'master' into add-inventory
2 parents bddd92f + a03a702 commit 4fc35d2

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

.gitpod.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [3.2.0](https://github.com/HospitalRun/components/compare/v3.1.0...v3.2.0) (2020-12-26)
2+
3+
4+
### Features
5+
6+
* **icon:** add billing icon ([#670](https://github.com/HospitalRun/components/issues/670)) ([b81d9d9](https://github.com/HospitalRun/components/commit/b81d9d9018e4479a6b6cc97701fe48ad1ac24250))
7+
8+
# [3.1.0](https://github.com/HospitalRun/components/compare/v3.0.4...v3.1.0) (2020-12-18)
9+
10+
11+
### Features
12+
13+
* **textfield:** add id prop to text field ([dd0ce21](https://github.com/HospitalRun/components/commit/dd0ce21cc06f2f6605ab98c412c94add76439e87))
14+
115
## [3.0.4](https://github.com/HospitalRun/components/compare/v3.0.3...v3.0.4) (2020-11-08)
216

317

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![NPM Version](https://badgen.net/npm/v/@hospitalrun/components)](https://www.npmjs.com/package/@hospitalrun/components) [![GitHub CI](https://github.com/HospitalRun/components/workflows/GitHub%20CI/badge.svg)](https://github.com/HospitalRun/components/actions) [![Coverage Status](https://coveralls.io/repos/github/HospitalRun/components/badge.svg?branch=master)](https://coveralls.io/github/HospitalRun/components?branch=master) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/HospitalRun/components.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/HospitalRun/components/context:javascript)
66
[![Bundlephobia](https://badgen.net/bundlephobia/min/@hospitalrun/components)](https://bundlephobia.com/result?p=@hospitalrun/components) ![Code scanning](https://github.com/HospitalRun/components/workflows/Code%20scanning/badge.svg?branch=master) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FHospitalRun%2Fcomponents.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FHospitalRun%2Fcomponents?ref=badge_shield)
77
![dependabot](https://api.dependabot.com/badges/status?host=github&repo=HospitalRun/components) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
8-
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Netlify Status](https://api.netlify.com/api/v1/badges/70c843de-c1b2-4e7d-abb5-61939f21f8cb/deploy-status)](https://app.netlify.com/sites/hospitalrun-components/deploys) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/HospitalRun/components) [![Slack](https://hospitalrun-slackin.herokuapp.com/badge.svg)](https://hospitalrun-slackin.herokuapp.com)
8+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Netlify Status](https://api.netlify.com/api/v1/badges/70c843de-c1b2-4e7d-abb5-61939f21f8cb/deploy-status)](https://app.netlify.com/sites/hospitalrun-components/deploys) [![Slack](https://hospitalrun-slackin.herokuapp.com/badge.svg)](https://hospitalrun-slackin.herokuapp.com)
99

1010
</div>
1111

@@ -46,9 +46,7 @@ Contributions are always welcome. Before contributing please read our [contribut
4646

4747
## Online one-click setup for contributing
4848

49-
Contribute to HospitalRun using a fully featured online development environment that will automatically: clone the repo, install the dependencies and start the webserver.
50-
51-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/HospitalRun/components)
49+
Contribute to HospitalRun using [GitHub Codespace](https://github.com/codespaces) a fully featured online development environment that will automatically: clone the repo, install the dependencies and start the webserver.
5250

5351
## Working on an Issue
5452

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hospitalrun/components",
3-
"version": "3.0.4",
3+
"version": "3.2.0",
44
"license": "MIT",
55
"funding": {
66
"type": "opencollective",
@@ -101,9 +101,9 @@
101101
"cz-conventional-changelog": "~3.3.0",
102102
"enzyme": "~3.11.0",
103103
"enzyme-adapter-react-16": "~1.15.2",
104-
"eslint": "~7.15.0",
104+
"eslint": "~7.16.0",
105105
"eslint-config-airbnb": "~18.2.0",
106-
"eslint-config-prettier": "~7.0.0",
106+
"eslint-config-prettier": "~7.1.0",
107107
"eslint-plugin-import": "~2.22.0",
108108
"eslint-plugin-jest": "~24.1.0",
109109
"eslint-plugin-jsx-a11y": "~6.4.1",

src/components/TextField/TextField.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import Form from 'react-bootstrap/Form'
44
import { getControlSize } from '../../helpers/controlSize'
55

66
interface Props {
7+
/** A unique identifier for the componentchrome
8+
*
9+
*/
10+
id?: string
711
/** Determines whether the TextField should be disabled or not. By default, it is false. */
812
disabled?: boolean
913
/** Determines whether the TextField should be rendered as invalid or not. By default, it is false. */
@@ -39,6 +43,7 @@ interface Props {
3943
*/
4044
const TextField = (props: Props) => {
4145
const {
46+
id,
4247
disabled,
4348
isValid,
4449
isInvalid,
@@ -56,6 +61,7 @@ const TextField = (props: Props) => {
5661
return (
5762
<Form.Group>
5863
<Form.Control
64+
id={id}
5965
as="textarea"
6066
disabled={disabled}
6167
isInvalid={isInvalid}

test/textfield.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ describe('TextField', () => {
1616
it('renders a TextField with attributes', () => {
1717
const name = 'example_field'
1818
const value = 'this is teh text field text'
19+
const id = 'someId'
1920
const rows = 5
20-
const wrapper = mount(<TextField name={name} value={value} onChange={onChange} rows={rows} />)
21+
const wrapper = mount(
22+
<TextField id={id} name={name} value={value} onChange={onChange} rows={rows} />,
23+
)
2124

25+
expect(wrapper.find(HTMLTextAreaElement).prop('id')).toEqual(id)
2226
expect(wrapper.find(HTMLTextAreaElement)).toHaveLength(1)
2327
expect(
2428
wrapper.find(HTMLTextAreaElement).filterWhere((item) => item.prop('name') === name),

0 commit comments

Comments
 (0)