Skip to content

Commit 7fd77fd

Browse files
Merge pull request #25 from glints-dev/feat/bulk-action-pos-align
Bulk actions position and alignment
2 parents 89fccdd + 0bb9bd0 commit 7fd77fd

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.changeset/tiny-coins-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris-glints': minor
3+
---
4+
5+
bulk action position and alignment styles

polaris-react/src/components/BulkActions/components/BulkActionButton/BulkActionButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {useComponentDidMount} from '../../../../utilities/use-component-did-moun
99
import styles from '../../BulkActions.scss';
1010

1111
export type BulkActionButtonProps = {
12-
disclosure?: boolean;
12+
disclosure?: boolean | 'up';
1313
indicator?: boolean;
1414
handleMeasurement?(width: number): void;
1515
showContentInButton?: boolean;
@@ -49,7 +49,11 @@ export function BulkActionButton({
4949
accessibilityLabel={
5050
disclosure && !showContentInButton ? content : accessibilityLabel
5151
}
52-
disclosure={disclosure && showContentInButton}
52+
disclosure={
53+
typeof disclosure === 'string'
54+
? disclosure
55+
: disclosure && showContentInButton
56+
}
5357
onClick={onAction}
5458
disabled={disabled}
5559
size="slim"

polaris-react/src/components/BulkActions/components/BulkActionMenu/BulkActionMenu.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function BulkActionMenu({
2323
active={isVisible}
2424
activator={
2525
<BulkActionButton
26-
disclosure
26+
disclosure="up"
2727
showContentInButton
2828
onAction={toggleMenuVisibility}
2929
content={title}
@@ -33,6 +33,8 @@ export function BulkActionMenu({
3333
}
3434
onClose={toggleMenuVisibility}
3535
preferInputActivator
36+
preferredPosition="above"
37+
preferredAlignment="left"
3638
>
3739
<ActionList items={actions} onActionAnyItem={toggleMenuVisibility} />
3840
</Popover>

0 commit comments

Comments
 (0)