diff --git a/components/author/index.js b/components/author/index.js index 8fe39562..11f52641 100644 --- a/components/author/index.js +++ b/components/author/index.js @@ -22,7 +22,7 @@ import { AuthorContext } from './context'; */ export const Name = (props) => { - const { tagName: TagName, ...rest } = props; + const { tagName: TagName = 'span', ...rest } = props; /** * @type {Author} @@ -47,7 +47,7 @@ Name.defaultProps = { }; export const FirstName = (props) => { - const { tagName: TagName, ...rest } = props; + const { tagName: TagName = 'span', ...rest } = props; /** * @type {Author} @@ -66,7 +66,7 @@ FirstName.defaultProps = { }; export const LastName = (props) => { - const { tagName: TagName, ...rest } = props; + const { tagName: TagName = 'span', ...rest } = props; /** * @type {Author} diff --git a/components/post-date/index.js b/components/post-date/index.js index 90bf678a..72ab538c 100644 --- a/components/post-date/index.js +++ b/components/post-date/index.js @@ -28,7 +28,7 @@ PostDatePicker.propTypes = { }; export const PostDate = (props) => { - const { placeholder, format, ...rest } = props; + const { placeholder = __('No date set', 'tenup'), format, ...rest } = props; const { postId, postType, isEditable } = usePost(); diff --git a/components/post-excerpt/index.js b/components/post-excerpt/index.js index 321fbe6e..1404a71e 100644 --- a/components/post-excerpt/index.js +++ b/components/post-excerpt/index.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import { usePost } from '../../hooks'; export const PostExcerpt = (props) => { - const { placeholder, ...rest } = props; + const { placeholder = __('Enter excerpt...', 'tenup'), ...rest } = props; const { postId, postType, isEditable } = usePost(); const [rawExcerpt = '', setExcerpt, fullExcerpt] = useEntityProp( diff --git a/components/post-meta/index.js b/components/post-meta/index.js index 2c09b216..27a06f74 100644 --- a/components/post-meta/index.js +++ b/components/post-meta/index.js @@ -29,7 +29,7 @@ PostMeta.propTypes = { }; const MetaString = (props) => { - const { metaKey, tagName } = props; + const { metaKey, tagName = 'p' } = props; const [metaValue, setMetaValue] = usePostMetaValue(metaKey); return ; diff --git a/components/post-primary-term/index.js b/components/post-primary-term/index.js index d1f10a2c..25485e38 100644 --- a/components/post-primary-term/index.js +++ b/components/post-primary-term/index.js @@ -3,7 +3,12 @@ import PropTypes from 'prop-types'; import { usePrimaryTerm } from '../../hooks'; export const PostPrimaryTerm = (props) => { - const { taxonomyName, placeholder, isLink, ...rest } = props; + const { + taxonomyName = 'category', + placeholder = __('Select a term', 'tenup'), + isLink = true, + ...rest + } = props; const [primaryTerm, isSupportedTaxonomy] = usePrimaryTerm(taxonomyName); diff --git a/components/post-term-list/index.js b/components/post-term-list/index.js index ba024dee..04c41f01 100644 --- a/components/post-term-list/index.js +++ b/components/post-term-list/index.js @@ -11,7 +11,7 @@ import { PostTermContext } from './context'; import { ListItem, TermLink } from './item'; export const PostTermList = (props) => { - const { tagName: TagName, taxonomyName, children, ...rest } = props; + const { tagName: TagName = 'ul', taxonomyName, children, ...rest } = props; const { isEditable } = usePost(); diff --git a/components/post-term-list/item.js b/components/post-term-list/item.js index bdcdaf5d..df44640f 100644 --- a/components/post-term-list/item.js +++ b/components/post-term-list/item.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { PostTermContext } from './context'; export const ListItem = (props) => { - const { tagName: TagName, children, ...rest } = props; + const { tagName: TagName = 'li', children, ...rest } = props; return {children}; }; diff --git a/components/post-title/index.js b/components/post-title/index.js index 237c9ecd..3db54ad6 100644 --- a/components/post-title/index.js +++ b/components/post-title/index.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import { usePost } from '../../hooks'; export const PostTitle = (props) => { - const { tagName: TagName, ...rest } = props; + const { tagName: TagName = 'h1', ...rest } = props; const { postId, postType, isEditable } = usePost(); const [rawTitle = '', setTitle, fullTitle] = useEntityProp(