pub struct MediaCardGridProps {Show 13 fields
pub data_path: String,
pub title_key: String,
pub description_key: Option<String>,
pub image_key: Option<String>,
pub image_href_key: Option<String>,
pub image_aspect_ratio: Option<String>,
pub image_position: Option<String>,
pub badge_key: Option<String>,
pub badge_variant_key: Option<String>,
pub row_key: Option<String>,
pub row_actions: Option<Vec<DropdownMenuAction>>,
pub empty_message: Option<String>,
pub columns: Option<u8>,
}Expand description
Props for MediaCardGrid — a responsive card grid backed by a data array. Mirrors DataTable’s row_key/row_actions/data_path contract but renders cards with an optional screenshot image instead of table rows.
Fields§
§data_path: String§title_key: StringKey in each row object whose value becomes the card title.
description_key: Option<String>Key for the subtitle/URL line below the title.
image_key: Option<String>Key for the screenshot image URL. No image rendered when absent or empty.
image_href_key: Option<String>Key for the URL the image links to (opens in new tab).
image_aspect_ratio: Option<String>CSS aspect-ratio value for the image (default “4/5”).
image_position: Option<String>CSS object-position for the cropped image: “top” | “center” | “bottom” (or any valid object-position value). Default “center”.
badge_key: Option<String>Key for the footer badge label text.
badge_variant_key: Option<String>Key for the badge variant string: “outline” | “destructive” | “default”.
row_key: Option<String>Key used for {row_key} substitution in row_action URLs.
row_actions: Option<Vec<DropdownMenuAction>>§empty_message: Option<String>§columns: Option<u8>Number of columns in the grid (default 3).
Trait Implementations§
Source§impl Clone for MediaCardGridProps
impl Clone for MediaCardGridProps
Source§fn clone(&self) -> MediaCardGridProps
fn clone(&self) -> MediaCardGridProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MediaCardGridProps
impl Debug for MediaCardGridProps
Source§impl<'de> Deserialize<'de> for MediaCardGridProps
impl<'de> Deserialize<'de> for MediaCardGridProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MediaCardGridProps
impl JsonSchema for MediaCardGridProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for MediaCardGridProps
impl PartialEq for MediaCardGridProps
Source§fn eq(&self, other: &MediaCardGridProps) -> bool
fn eq(&self, other: &MediaCardGridProps) -> bool
self and other values to be equal, and is used by ==.