Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.02 KB

File metadata and controls

27 lines (19 loc) · 1.02 KB

Post Date

The PostDate component is part of the suite of components that read/write data from the global post object or the current <PostContext />. It has a composable declarative approach to allow you full control over the markup without needing to worry about the data handling at all.

The Component allows you to showcase the publish date of the current post.

Usage

import { PostDate } from '@10up/block-components';

function BlockEdit() {

    return (
        <PostDate className="wp-block-example-hero__date" />
    )
}

Props

Name Type Default Description
placeholder string No date set
format string Uses the WordPress date format setting of the site
timezone string Uses the WordPress site timezone when not provided
...rest object {}