Blueprints Table: Clear selection button now a <Button>
As per discussion with UX, change the `Clear selection` card to a button (link variant).
This commit is contained in:
parent
68e4cba9a3
commit
d204d4c5dc
2 changed files with 7 additions and 19 deletions
|
|
@ -3,9 +3,6 @@ import React, { useState, useCallback } from 'react';
|
|||
import {
|
||||
Bullseye,
|
||||
Button,
|
||||
Card,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
EmptyState,
|
||||
EmptyStateActions,
|
||||
EmptyStateBody,
|
||||
|
|
@ -106,23 +103,14 @@ const BlueprintsSidebar = ({
|
|||
/>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<Card
|
||||
ouiaId={`blueprint-card-all`}
|
||||
isCompact
|
||||
isClickable
|
||||
<Button
|
||||
ouiaId={`clear-selected-blueprint-button`}
|
||||
variant="link"
|
||||
isDisabled={!selectedBlueprint}
|
||||
onClick={() => setSelectedBlueprint(undefined)}
|
||||
>
|
||||
<CardHeader
|
||||
selectableActions={{
|
||||
selectableActionId: 'show-all-card',
|
||||
name: 'blueprints',
|
||||
variant: 'single',
|
||||
onClickAction: () => setSelectedBlueprint(undefined),
|
||||
}}
|
||||
>
|
||||
<CardTitle component="a">Clear selection</CardTitle>
|
||||
</CardHeader>
|
||||
</Card>
|
||||
Clear selection
|
||||
</Button>
|
||||
</StackItem>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ describe('Blueprints', () => {
|
|||
|
||||
// wait for debounce
|
||||
await waitFor(() => {
|
||||
expect(screen.getAllByRole('radio')).toHaveLength(2);
|
||||
expect(screen.getAllByRole('radio')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue