Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add default title constant
Browse files Browse the repository at this point in the history
  • Loading branch information
tarhi-saad authored and mikejolley committed Jul 11, 2023
1 parent b45fb70 commit 8570268
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions assets/js/blocks/order-confirmation/billing-address/attributes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Internal dependencies
*/
import { DEFAULT_TITLE } from './constants';

const attributes = ( {
defaultTitle = DEFAULT_TITLE,
}: {
defaultTitle: string;
} ): Record< string, Record< string, unknown > > => ( {
title: {
type: 'string',
default: defaultTitle,
},
} );

export default attributes;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';

export const DEFAULT_TITLE = __(
'Billing address',
'woo-gutenberg-products-block'
);

0 comments on commit 8570268

Please sign in to comment.