diff --git a/CHANGELOG.md b/CHANGELOG.md index bec28e4465..9b8f00260b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.4.0 + +* Added added support for css styling of container-div, using prop containerClassName + ## 2.3.0 * Added onBlur support diff --git a/README.md b/README.md index a405a2fe88..1a62dfeae1 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,16 @@ Passing `invalid` to the `Dropdown` will give a red color on the element. ``` +If you need to add styling to the outer div-container of the component and pass the attribute containerClassName. +The containerClassName will be appended to the default class 'ffe-input-group'. + +```javascript + + + + +``` + ### Loading state Loading state can be indicated using `isLoading`. When this is set a loading spinner will be rendered next to the dropdown. diff --git a/package.json b/package.json index a01d36cde6..14390f6674 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffe-dropdown-react", - "version": "2.3.0", + "version": "2.4.0", "main": "lib/dropdown.js", "scripts": { "build": "babel -d lib/. --ignore=*.test.js src/. && npm run example", diff --git a/src/dropdown.js b/src/dropdown.js index 547f84b171..867fe468a1 100644 --- a/src/dropdown.js +++ b/src/dropdown.js @@ -10,6 +10,7 @@ const createID = (label, options) => { function Dropdown({ id, className = '', + containerClassName = '', label, onChange, onBlur, @@ -22,14 +23,14 @@ function Dropdown({ }) { const domId = id || createID(label, children); - return
+ return
{ label && }