Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit c3ae8f2

Browse files
author
Sean
authored
Merge pull request #509 from GSA/ss_fix-api-selector
Fixed api selector
2 parents f381ee3 + f7a2293 commit c3ae8f2

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

src/components/federal-agencies/inventory-code/inventory-code-section.component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class InventoryCodeSectionComponent extends Component {
6565
'border-left-0': indent === 0,
6666
'border-base-lighter': indent === 1 || 2 || 3,
6767
'border-left-2px': indent === 1 || 2 || 3
68-
})} usa-accordion__button bg-white padding-left-1 mobile:padding-left-205 border-right-0 border-bottom-0 border-top-0 border-dashed font-body-md tablet-lg:padding-left-3 tablet-lg:padding-right-5 tablet-lg:padding-y-2`}
68+
})} api-drop-list bg-white padding-left-1 mobile:padding-left-205 border-right-0 border-bottom-0 border-top-0 border-dashed font-body-md tablet-lg:padding-left-3 tablet-lg:padding-right-5 tablet-lg:padding-y-2`}
6969
aria-expanded={dropDown}
7070
aria-controls={`${key}-section`}
7171
onClick={this.toggleDropDown}
@@ -75,7 +75,7 @@ class InventoryCodeSectionComponent extends Component {
7575
<dd
7676
className={`${classNames({
7777
'text-accent-cool-dark': optionalField
78-
})} display-inline margin-left-0`}
78+
})} text-bold display-inline margin-left-0`}
7979
>
8080
{key}
8181
</dd>

src/components/federal-agencies/inventory-code/inventory-code-section.component.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('components - InventoryCodeSectionComponent', () => {
4545
}
4646
]
4747
})
48-
expect(wrapper.find('button').prop('className')).toContain('usa-accordion__button')
48+
expect(wrapper.find('button').prop('className')).toContain('api-drop-list')
4949
})
5050

5151
it('should show subfields on click', () => {
@@ -65,7 +65,7 @@ describe('components - InventoryCodeSectionComponent', () => {
6565

6666
console.log(wrapper.debug())
6767

68-
wrapper.find('.usa-accordion__button').simulate('click')
68+
wrapper.find('.api-drop-list').simulate('click')
6969
expect(wrapper.state('dropDown')).toBeTruthy()
7070
})
7171
})

styles/theme/_uswds-theme-custom-styles.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,37 @@ html {
137137
}
138138
}
139139
}
140+
141+
button.api-drop-list {
142+
padding-right: 1.25rem;
143+
width: 100%;
144+
145+
.description {
146+
padding-right: 1.25rem;
147+
}
148+
149+
& > dl {
150+
background-repeat: no-repeat;
151+
background-size: 1rem;
152+
background-position: right center;
153+
text-align: left;
154+
display: inline-block;
155+
width: 100%;
156+
line-height: 1.15;
157+
}
158+
159+
&[aria-expanded='false'] > dl {
160+
background-image: url(/fonts/plus.svg),
161+
-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));
162+
background-image: url(/fonts/plus.svg), linear-gradient(transparent, transparent);
163+
}
164+
&[aria-expanded='true'] > dl {
165+
background-image: url(/fonts/minus.svg),
166+
-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));
167+
background-image: url(/fonts/minus.svg), linear-gradient(transparent, transparent);
168+
}
169+
}
170+
140171
code {
141172
background-color: rgba(0, 0, 0, 0.05);
142173
}

0 commit comments

Comments
 (0)