Skip to content

Commit 78f7378

Browse files
committed
Feat: ActionsGeneric block
1 parent 2873cad commit 78f7378

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

packages/components/src/components/hds/filter-bar/index.hbs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SPDX-License-Identifier: MPL-2.0
44
}}
55
<div class="hds-filter-bar" ...attributes>
6-
<div class="hds-filter-bar__actions">
6+
<Hds::Layout::Flex @align="end" @gap="8" class="hds-filter-bar__actions">
77
{{yield
88
(hash
99
FiltersDropdown=(component
@@ -23,7 +23,8 @@
2323
{{on "change" this.onSearch}}
2424
/>
2525
{{/if}}
26-
<div class="hds-filter-bar__actions__right">
26+
<Hds::Layout::Flex @gap="8" @align="center" class="hds-filter-bar__actions__right">
27+
{{yield (hash ActionsGeneric=(component "hds/yield"))}}
2728
{{yield (hash ActionsDropdown=(component "hds/dropdown"))}}
2829
<Hds::Button
2930
@text={{if
@@ -37,8 +38,8 @@
3738
@isIconOnly={{true}}
3839
{{on "click" this.toggleExpand}}
3940
/>
40-
</div>
41-
</div>
41+
</Hds::Layout::Flex>
42+
</Hds::Layout::Flex>
4243
{{#if this._isExpanded}}
4344
<div class="hds-filter-bar__filters">
4445
{{#if this.hasActiveFilters}}

packages/components/src/components/hds/filter-bar/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import type {
1919
HdsFilterBarGenericFilterData,
2020
} from './types.ts';
2121
import HdsDropdown from '../dropdown/index.ts';
22+
import HdsYield from '../yield/index.ts';
2223
import HdsFilterBarFiltersDropdown from './filters-dropdown.ts';
2324
import { isArray } from '@ember/array';
2425

@@ -36,6 +37,7 @@ export interface HdsFilterBarSignature {
3637
default?: [
3738
{
3839
ActionsDropdown?: WithBoundArgs<typeof HdsDropdown, never>;
40+
ActionsGeneric?: WithBoundArgs<typeof HdsYield, never>;
3941
FiltersDropdown?: WithBoundArgs<
4042
typeof HdsFilterBarFiltersDropdown,
4143
'filters' | 'isLiveFilter' | 'onFilter'

packages/components/src/styles/components/filter-bar.scss

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,9 @@
2727
width: auto;
2828
}
2929
}
30-
31-
.hds-filter-bar__actions {
32-
display: flex;
33-
flex-direction: row;
34-
gap: 8px;
35-
align-items: end;
36-
}
3730
}
3831

3932
.hds-filter-bar__actions__right {
40-
display: flex;
41-
flex-direction: row;
42-
gap: 8px;
4333
margin-left: auto;
4434
}
4535

showcase/app/components/mock/app/main/generic-advanced-table.gts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { get } from '@ember/helper';
1010
import { on } from '@ember/modifier';
1111
import style from 'ember-style-modifier/modifiers/style';
1212

13+
import ShwPlaceholder from 'showcase/components/shw/placeholder';
14+
1315
// HDS components
1416
import {
1517
HdsAdvancedTable,
@@ -810,6 +812,9 @@ export default class MockAppMainGenericAdvancedTable extends Component<MockAppMa
810812
{{style marginBottom="24px"}}
811813
as |F|
812814
>
815+
<F.ActionsGeneric>
816+
<ShwPlaceholder @text="generic content" @height="24" />
817+
</F.ActionsGeneric>
813818
<F.ActionsDropdown as |D|>
814819
<D.ToggleButton @text="Actions" @color="secondary" @size="small" />
815820
<D.Checkbox>access</D.Checkbox>
@@ -899,6 +904,9 @@ export default class MockAppMainGenericAdvancedTable extends Component<MockAppMa
899904
@onFilter={{this.onFilter}}
900905
as |F|
901906
>
907+
<F.ActionsGeneric>
908+
<ShwPlaceholder @text="generic content" @height="24" />
909+
</F.ActionsGeneric>
902910
<F.ActionsDropdown as |D|>
903911
<D.ToggleButton
904912
@text="Actions"

0 commit comments

Comments
 (0)