Skip to content

Commit

Permalink
add icon to valueset lists if active===false (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrund-tsi authored Jul 2, 2021
1 parent c8fe6bf commit 025cd03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.3",
"@react-keycloak/web": "^3.4.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/assets/SCSS/custom.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//Font Definitions
@import '@fortawesome/fontawesome-free/css/solid.min.css';

// Override default variables before the import
$body-bg: #cfcfcf;
Expand All @@ -21,6 +22,10 @@ $data-card-border-radius: 0px;
$input-border-radius: 4px;
$user-image-width: 39px;

select, option {
font-family: 'Font Awesome 5 Free', 'Arial';
}

hr {
margin-left: 0;
margin-right: 0;
Expand Down
4 changes: 3 additions & 1 deletion src/components/modules/form-group.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export const FormGroupValueSetSelect = (props: any) => {
const getOptionsForValueSet = (valueSet: IValueSet): JSX.Element[] => {
const result: JSX.Element[] = [];
for (const key of Object.keys(valueSet)) {
result.push(<option key={key} value={key}>{valueSet[key].display}</option>)
result.push(valueSet[key].active === false
? <option key={key} value={key}>&#xf071; {valueSet[key].display}</option>
: <option key={key} value={key}>{valueSet[key].display}</option>);
}

return result;
Expand Down

0 comments on commit 025cd03

Please sign in to comment.