How to use @crave/farmblocks-image - 6 common examples

To help you get started, we’ve selected a few @crave/farmblocks-image examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CraveFood / farmblocks / packages / footer / src / components / HelperContent.js View on Github external
const HelperContent = props => {
  const renderLink = props.linkText && (props.linkHref || props.linkOnClick);

  return (
    
      {props.imageSrc && (
        <img size="{badgeSizes.MEDIUM}" src="{props.imageSrc}">
      )}

      <div>
        

        {renderLink &amp;&amp; (
          </div>
github CraveFood / farmblocks / packages / input-select / src / components / EmptyCard.js View on Github external
const EmptyCard = ({ noResultsMessage, className }) =&gt; (
  
    <img size="{badgeSizes.MEDIUM}" src="{helperSrc}">
    
  
);
github CraveFood / farmblocks / packages / input-select / src / components / withImage.js View on Github external
render() {
      const { image, inputRef, ...props } = this.props;

      return (
        
          {image &amp;&amp; (
            
          )}
          <input>
        
      );
    }
  };
github CraveFood / farmblocks / packages / hoc-validation-messages / src / withMessages.js View on Github external
{this.state.messages.map(text =&gt; (
              
                <img size="{badgeSizes.SMALL}" src="{errorIconSrc}">
                
              
            ))}
github CraveFood / farmblocks / packages / sidenav / src / components / NavItem / NavItem.js View on Github external
icon: PropTypes.node,

  /**
   * Size for the icon
   */
  iconSize: PropTypes.string,

  /**
   * Image src url (don't use `image` prop along with `icon` prop)
   */
  image: PropTypes.string,

  /**
   * Props for image component, accept any farmblocks-image prop
   */
  imageProps: PropTypes.shape(Image.propTypes),

  /**
   * Props for children(text) component, accept any farmblocks-text prop
   */
  textProps: PropTypes.shape(Text.propTypes),
};

export default NavItem;
github CraveFood / farmblocks / packages / input-select / src / components / Item.js View on Github external
const Item = ({ selected, image, label, checkbox, className, ...props }) =&gt; (
  
    
      {checkbox &amp;&amp; }
      {image &amp;&amp; (
        
      )}
      {label}
    
    {!checkbox &amp;&amp; selected &amp;&amp; }
  
);

@crave/farmblocks-image

A react component for thumbnail images

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages