1.1.0 • Published 4 years ago
@magnetita/product-image v1.1.0
@magnetita/product-image
Installation
npm i @magnetita/product-image -D
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
type | product type | string | [NO-VALUE] |
width | original image width | string | [NO-VALUE] |
height | original image height | string | [NO-VALUE] |
image | image URI | string | [NO-VALUE] |
isLazy | add lazy image loaders | boolean | true |
hasShadow | adds shadow effect to the image | boolean | true |
isCropped | add a mask at the edges | boolean | true |
isPortrait | add portrait orientation | string | false |
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 Class | Description |
---|---|
c-PImage | |
c-PImage__case | |
c-PImage__cropped | |
c-PImage__shadow | |
c-PImage__object | |
c-PImage__object--y |
Dependencies
Objects Classes
CSS Class | Description |
---|---|
o-center |
Functional Classes
CSS Class | Description |
---|---|
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