1.1.0 • Published 5 years ago
@magnetita/product-image v1.1.0
@magnetita/product-image
Installation
npm i @magnetita/product-image -DParameters
| 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/objectsand@magnetita/utilitybuilt this component
1.1.0
5 years ago
1.1.0-alpha.0
5 years ago
1.0.20
5 years ago
1.0.19
5 years ago
1.0.18
5 years ago
1.0.17-alpha.0
5 years ago
1.0.16
5 years ago
1.0.16-alpha.0
5 years ago
1.0.15-alpha.0
5 years ago
1.0.14
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8-alpha.0
6 years ago
1.0.7-alpha.0
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago