|
| 1 | +INSERT INTO component(name, icon, description, introduced_in_version) VALUES |
| 2 | + ('empty_state', 'info-circle', 'Displays a large placeholder message to communicate a single information to the user and invite them to take action. |
| 3 | +
|
| 4 | +Typically includes a title, an optional icon/image, descriptive text (rich text formatting and images supported via Markdown), and a call-to-action button. |
| 5 | +
|
| 6 | +Ideal for first-use screens, empty data sets, "no results" pages, or error messages.', '0.35.0'); |
| 7 | + |
| 8 | +INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'empty_state', * FROM (VALUES |
| 9 | + ('title','Description of the empty state.','TEXT',TRUE,FALSE), |
| 10 | + ('header','Text displayed on the top of the empty state.','TEXT',TRUE,TRUE), |
| 11 | + ('icon','Name of an icon to be displayed on the top of the empty state.','ICON',TRUE,TRUE), |
| 12 | + ('image','The URL (absolute or relative) of an image to display at the top of the empty state.','URL',TRUE,TRUE), |
| 13 | + ('description','A short text displayed below the title.','TEXT',TRUE,TRUE), |
| 14 | + ('link_text','The text displayed on the button.','TEXT',TRUE,FALSE), |
| 15 | + ('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), |
| 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) |
| 19 | +) x; |
| 20 | + |
| 21 | +INSERT INTO example(component, description, properties) VALUES |
| 22 | + ('empty_state', ' |
| 23 | +This example shows how to create a 404-style "Not Found" empty state with |
| 24 | + - a prominent header displaying "404", |
| 25 | + - a helpful description suggesting to adjust search parameters, and |
| 26 | + - a "Search again" button with a search icon that links back to the search page. |
| 27 | +', |
| 28 | + json('[{ |
| 29 | + "component": "empty_state", |
| 30 | + "title": "No results found", |
| 31 | + "header": "404", |
| 32 | + "description": "Try adjusting your search or filter to find what you''re looking for.", |
| 33 | + "link_text": "Search again", |
| 34 | + "link_icon": "search", |
| 35 | + "link": "#not-found", |
| 36 | + "id": "not-found" |
| 37 | + }]')), |
| 38 | + ('empty_state', ' |
| 39 | +It''s possible to use an icon or an image to illustrate the problem. |
| 40 | +', |
| 41 | + json('[{ |
| 42 | + "component": "empty_state", |
| 43 | + "title": "A critical problem has occurred", |
| 44 | + "icon": "mood-wrrr", |
| 45 | + "description_md": "SQLPage can do a lot of things, but this is not one of them. |
| 46 | +
|
| 47 | +Please restart your browser and **cross your fingers**.", |
| 48 | + "link_text": "Close and restart", |
| 49 | + "link_icon": "rotate-clockwise", |
| 50 | + "link": "#" |
| 51 | + }]')); |
| 52 | + |
0 commit comments