class Primer::BlankslateComponent
<%= link_to_heading_practices %>
‘Blankslate` renders an `<h3>` element for the title by default. Update the heading level based on what is appropriate for your page hierarchy by setting `title_tag`.
@accessibility
Use `Blankslate` when there is a lack of content within a page or section. Use as placeholder to tell users why something isn’t there.
def initialize(
-
system_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> -
spacious
(Boolean
) -- Adds extra padding. -
large
(Boolean
) -- Increases the font size. -
narrow
(Boolean
) -- Adds a maximum width. -
link_url
(String
) -- The URL where the user will be taken after clicking the link. -
link_text
(String
) -- The text of the link. -
button_classes
(String
) -- Classes to apply to action button -
button_url
(String
) -- The URL where the user will be taken after clicking the button. -
button_text
(String
) -- The text of the button. -
description
(String
) -- Text that appears below the title. Typically a whole sentence. -
image_alt
(String
) -- Alt text for image. -
image_src
(String
) -- Image to display. -
icon_size
(Symbol
) -- <%= one_of(Primer::Beta::Octicon::SIZE_MAPPINGS, sort: false) %> -
icon
(Symbol
) -- Octicon icon to use at top of component. -
title_tag
(Symbol
) -- HTML tag to use for title. -
title
(String
) -- Text that appears in a larger bold font.
def initialize( title: "", title_tag: :h3, icon: "", icon_size: :medium, image_src: "", image_alt: " ", description: "", button_text: "", button_url: "", button_classes: "btn-primary my-3", link_text: "", link_url: "", # variations narrow: false, large: false, spacious: false, **system_arguments ) @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( @system_arguments[:classes], "blankslate", "blankslate-narrow": narrow, "blankslate-large": large, "blankslate-spacious": spacious ) @title_tag = title_tag @icon = icon @icon_size = icon_size @image_src = image_src @image_alt = image_alt @title = title @description = description @button_text = button_text @button_url = button_url @button_classes = button_classes @link_text = link_text @link_url = link_url end