1.1.0 • Published 4 years ago

@magnetita/product-image v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@magnetita/product-image

Installation

npm i @magnetita/product-image -D

Parameters

ParameterDescriptionTypeDefault
typeproduct typestring[NO-VALUE]
widthoriginal image widthstring[NO-VALUE]
heightoriginal image heightstring[NO-VALUE]
imageimage URIstring[NO-VALUE]
isLazyadd lazy image loadersbooleantrue
hasShadowadds shadow effect to the imagebooleantrue
isCroppedadd a mask at the edgesbooleantrue
isPortraitadd portrait orientationstringfalse

To use a standard size, use with +product-thumb() mixin (https://github.com/Foregon/magnetita/blob/master/packages/product-image/product-thumb.pug)

Pug

+product-image({
  'type': 'creditcard',
  'image': 'https://static.foregon.com/cartao-de-credito/cartao-americanas-com-visa.png',
  'isLazy': false,
})

Lit-html

import { html } from 'lit-html'
import PImage from '@magnetita/product-image/product-image-lit'

const props = {
  type: 'creditcard',
  isLazy: false,
  name: 'Cartão de Crédito Cartão Americanas.com Visa',
  image:
    'https://static.foregon.com/cartao-de-credito/cartao-americanas-com-visa.png',
  width: 100,
  height: 100,
}

return html`${PImage('widget', props)}`

Styles

@import '@magnetita/product-image/product-image.scss';

CSS Classes

CSS ClassDescription
c-PImage
c-PImage__case
c-PImage__cropped
c-PImage__shadow
c-PImage__object
c-PImage__object--y

Dependencies

Objects Classes

CSS ClassDescription
o-center

Functional Classes

CSS ClassDescription
u-m-0
u-h-100
u-w-100
u-relative

NOTE: @magnetita/objects and @magnetita/utility built this component

1.1.0

4 years ago

1.1.0-alpha.0

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17-alpha.0

4 years ago

1.0.16

4 years ago

1.0.16-alpha.0

4 years ago

1.0.15-alpha.0

4 years ago

1.0.14

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8-alpha.0

4 years ago

1.0.7-alpha.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago