10000 Add responsive, loading and accessibility to Image PropTypes · cloudinary/cloudinary-react@0fe9119 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fe9119

Browse files
nirmaozNir Maoz
authored andcommitted
Add responsive, loading and accessibility to Image PropTypes
1 parent 9311217 commit 0fe9119

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/CloudinaryComponent/CloudinaryComponent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ class CloudinaryComponent extends PureComponent {
163163

164164
CloudinaryComponent.propTypes = typesFrom(Transformation.PARAM_NAMES.map(camelCase));
165165
CloudinaryComponent.propTypes.publicId = PropTypes.string;
166-
CloudinaryComponent.propTypes.responsive = PropTypes.bool;
167-
CloudinaryComponent.propTypes.loading = PropTypes.string;
168166

169167
/**
170168
* Create a React type definition object. All items are PropTypes.string or [string] or object or [object].

src/components/Image/Image.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, {createRef, Fragment} from 'react';
22
import CloudinaryComponent from '../CloudinaryComponent';
33
import {extractCloudinaryProps, getImageTag, makeElementResponsive, getConfiguredCloudinary} from "../../Util";
44
import {Util} from "cloudinary-core";
5+
import PropTypes from "prop-types";
56

67
/**
78
* A component representing a Cloudinary served image
@@ -159,5 +160,8 @@ class Image extends CloudinaryComponent {
159160

160161
Image.defaultProps = {};
161162
Image.propTypes = CloudinaryComponent.propTypes;
163+
Image.propTypes.responsive = PropTypes.bool;
164+
Image.propTypes.loading = PropTypes.string;
165+
Image.propTypes.accessibility = PropTypes.string;
162166

163167
export default Image;

0 commit comments

Comments
 (0)
0