Skip to content

Commit 9df6fae

Browse files
anurag2787kasya
andauthored
remove underline and transition from ToggleableList (#2051)
Co-authored-by: Kate Golovanova <[email protected]>
1 parent 55187fc commit 9df6fae

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

frontend/__tests__/unit/components/ToggleableList.test.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('ToggleableList', () => {
169169
expect(header).toHaveClass('mb-4', 'text-2xl', 'font-semibold')
170170
})
171171

172-
it('applies correct CSS to button items', () => {
172+
it('applies correct CSS to button items (no underline, no transition, only hover background)', () => {
173173
const randomItems = ['React', 'Vue', 'Angular']
174174
render(<ToggleableList items={randomItems} label="Styled Buttons" />)
175175
const button = screen.getByText('React')
@@ -180,14 +180,16 @@ describe('ToggleableList', () => {
180180
'px-3',
181181
'py-1',
182182
'text-sm',
183-
'transition-all',
184-
'duration-200',
185-
'ease-in-out',
186-
'hover:scale-105',
187183
'hover:bg-gray-200',
188-
'hover:underline',
189184
'dark:border-gray-300',
190185
'dark:hover:bg-gray-700'
191186
)
187+
expect(button).not.toHaveClass(
188+
'hover:underline',
189+
'transition-all',
190+
'duration-200',
191+
'ease-in-out',
192+
'hover:scale-105'
193+
)
192194
})
193195
})

frontend/src/components/ToggleableList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const ToggleableList = ({
3737
{(showAll ? items : items.slice(0, limit)).map((item, index) => (
3838
<button
3939
key={index}
40-
className="rounded-lg border border-gray-400 px-3 py-1 text-sm transition-all duration-200 ease-in-out hover:scale-105 hover:bg-gray-200 hover:underline dark:border-gray-300 dark:hover:bg-gray-700"
40+
className="rounded-lg border border-gray-400 px-3 py-1 text-sm hover:bg-gray-200 dark:border-gray-300 dark:hover:bg-gray-700"
4141
onClick={() => handleButtonClick({ item })}
4242
>
4343
{item}

0 commit comments

Comments
 (0)