Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,9 @@ downloadBase64({

<kbd>App version >= 10.7: Partial support</kbd><br/> <kbd>App version >= 11.8:
expandedTitle</kbd><br/> <kbd>App version >= 14.8: Additional properties and
deprecations</kbd><br/> <kbd>App version >= 25.12: accessibilityLabel and
isButton</kbd><br/> <kbd>Partial support in B2P App version <=24.10:
title</kbd><br/> <kbd>Partial support in B2P App version >=24.11: right
actions</kbd><br/>
deprecations</kbd><br/> <kbd>App version >= 25.12: isButton</kbd><br/>
<kbd>Partial support in B2P App version <=24.10: title</kbd><br/> <kbd>Partial
support in B2P App version >=24.11: right actions</kbd><br/>

Customize WebView NavigationBar properties. You can set one or more properties
in a single call
Expand All @@ -308,8 +307,11 @@ type NavigationBarIcon = {
id: string;
/** URL to be opened by the app as a deep-link if present */
url?: string;
/** @deprecated use 'accessibilityLabel' instead */
name?: string;
/**
* Accessibility label for the icon. When isButton=true you should always set a name, when isButton=false if you don't want it to be
* read by screen readers, then explicitly set it to an empty string.
* */
name: string;
/** Accessibility label for the icon */
accessibilityLabel?: string;
/** default: true, set to false if the Icon is decorative */
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/utils-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ test('update navigation bar, with options', (done) => {
url: 'https://example.com/icon.png',
urlDark: 'https://example.com/icon-dark.png',
},
accessibilityLabel: 'Left',
name: 'Left',
badge: {
show: true,
nativeLogic: 'INBOX',
Expand All @@ -157,7 +157,7 @@ test('update navigation bar, with options', (done) => {
id: 'icon2',
url: 'https://example.com/action2',
iconEnum: 'SOME_ICON',
accessibilityLabel: 'Right',
name: 'Right',
badge: {
show: true,
number: 1,
Expand All @@ -167,7 +167,7 @@ test('update navigation bar, with options', (done) => {
{
id: 'icon3',
iconEnum: 'OTHER_ICON',
accessibilityLabel: 'Right 2',
name: 'Right 2',
},
],
colorVariant: 'INVERSE',
Expand Down
9 changes: 5 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ export type NavigationBarIcon = Readonly<{
id: string;
/** URL to be opened by the app as a deep-link if present */
url?: string;
/** @deprecated use 'accessibilityLabel' instead */
name?: string;
/** Accessibility label for the icon */
accessibilityLabel?: string;
/**
* Accessibility label for the icon. When isButton=true you should always set a name, when isButton=false if you don't want it to be
* read by screen readers, then explicitly set it to an empty string.
* */
name: string;
/** default: true, set to false if the Icon is decorative */
isButton?: boolean;
/**
Expand Down