Class: Uistiti::Alpha::ImagePreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
app/components/previews/uistiti/alpha/image_preview.rb

Sizes collapse

Instance Method Summary collapse

Instance Method Details

#largeObject



20
21
22
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 20

def large
  render(Uistiti::Alpha::Image.new(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: :large))
end

#mediumObject



16
17
18
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 16

def medium
  render(Uistiti::Alpha::Image.new(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: :medium))
end

#playground(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: 'large') ⇒ Object

Parameters:

  • source (defaults to: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png')
  • size (defaults to: 'large')

    select [small, medium, large, xl, xxl]



39
40
41
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 39

def playground(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: 'large')
  render(Uistiti::Alpha::Image.new(source: , size:))
end

#smallObject



12
13
14
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 12

def small
  render(Uistiti::Alpha::Image.new(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: :small))
end

#xlObject



24
25
26
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 24

def xl
  render(Uistiti::Alpha::Image.new(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: :xl))
end

#xxlObject



28
29
30
# File 'app/components/previews/uistiti/alpha/image_preview.rb', line 28

def xxl
  render(Uistiti::Alpha::Image.new(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: :xxl))
end