@nypl/design-system-react-components 3.4.0-rc-hero-2 → 3.4.0-rc-hero-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,13 +29,12 @@ export interface HeroProps {
|
|
|
29
29
|
heroType?: HeroTypes;
|
|
30
30
|
/** ID that other components can cross reference for accessibility purposes. */
|
|
31
31
|
id?: string;
|
|
32
|
-
/** Object used to create and render the `Image` component. You can pass
|
|
33
|
-
* (with its own internal props) or `src`, `alt`, and `
|
|
34
|
-
* You can also pass `fallBackSrc` and `onError` (only needed for the "campaign" variant).
|
|
32
|
+
/** Object used to create and render the `Image` component. You can pass `component`
|
|
33
|
+
* (with its own internal props, which will override) or `src`, `alt`, `id`, `fallBackSrc`, and `onError`.
|
|
35
34
|
* If `imageProps.alt` is left blank, a warning will be logged to the console and
|
|
36
35
|
* will cause accessibility issues. For `imageProps.src`, it will only work for
|
|
37
36
|
* the "secondary", "fiftyFifty" and "campaign" `Hero` types. */
|
|
38
|
-
imageProps?: ComponentImageProps
|
|
37
|
+
imageProps?: Pick<ComponentImageProps, "src" | "alt" | "id" | "fallbackSrc" | "onError" | "component">;
|
|
39
38
|
/** Optional boolean used to toggle the default text color from light to dark.
|
|
40
39
|
* Set isDarkText to `true` if the backgroundColor is set to a light color. */
|
|
41
40
|
isDarkText?: boolean;
|