Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1000 Bytes

File metadata and controls

24 lines (16 loc) · 1000 Bytes

Post Featured Image

The PostFeaturedImage 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 featured image of the current post. It uses the Image component under the hood but handles all the selection/image management logic.

Usage

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

function BlockEdit() {

    return (
        <PostFeaturedImage className="wp-block-example-hero__featured_image" />
    )
}

Props

Name Type Default Description
...rest object {}