Skip to content

Commit 2e1c4dc

Browse files
committed
add and document class and id attributes
1 parent 50d714f commit 2e1c4dc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/official-site/sqlpage/migrations/60_empty_state.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
1313
('description','A short text displayed below the title.','TEXT',TRUE,TRUE),
1414
('link_text','The text displayed on the button.','TEXT',TRUE,FALSE),
1515
('link_icon','Name of an icon to be displayed on the left side of the button.','ICON',TRUE,FALSE),
16-
('link','The URL to which the button should navigate when clicked.','URL',TRUE,FALSE)
16+
('link','The URL to which the button should navigate when clicked.','URL',TRUE,FALSE),
17+
('class','Class attribute added to the container in HTML. It can be used to apply custom styling to this item through css.','TEXT',TRUE,TRUE),
18+
('id','ID attribute added to the container in HTML. It can be used to target this item through css or for scrolling to this item through links (use "#id" in link url).','TEXT',TRUE,TRUE)
1719
) x;
1820

1921
INSERT INTO example(component, description, properties) VALUES
@@ -30,7 +32,8 @@ This example shows how to create a 404-style "Not Found" empty state with
3032
"description": "Try adjusting your search or filter to find what you''re looking for.",
3133
"link_text": "Search again",
3234
"link_icon": "search",
33-
"link": "#"
35+
"link": "#not-found",
36+
"id": "not-found"
3437
}]')),
3538
('empty_state', '
3639
It''s possible to use an icon or an image to illustrate the problem.

sqlpage/templates/empty_state.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="empty">
1+
<div class="empty{{#if class}} {{class}}{{/if}}"{{#if id}} id="{{id}}"{{/if}}>
22
{{#if header}}
33
<div class="empty-header">{{header}}</div>
44
{{else}}

0 commit comments

Comments
 (0)