Skip to content

Commit ab37a40

Browse files
author
Michal Mistina
committed
Added CSV button size top-level parameter
1 parent e22362e commit ab37a40

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
644644
('title', 'The text displayed on the download button.', 'TEXT', TRUE, FALSE),
645645
('filename', 'The name of the file that should be downloaded (without the extension).', 'TEXT', TRUE, TRUE),
646646
('icon', 'Name of the icon (from tabler-icons.io) to display in the button.', 'ICON', TRUE, TRUE),
647-
('color', 'Color of the button', 'COLOR', TRUE, TRUE)
647+
('color', 'Color of the button', 'COLOR', TRUE, TRUE),
648+
('size', 'The size of the button (e.g., sm, lg).', 'TEXT', TRUE, TRUE)
648649
) x;
649650

650651
INSERT INTO example(component, description, properties) VALUES

sqlpage/templates/csv.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{~/each_row~}}
1818
"
1919
download="{{default filename title}}.csv"
20-
class="btn btn-{{default color "primary"}}">
20+
class="btn btn-{{default color "primary"}}{{#if size}} btn-{{size}}{{/if}}">
2121
{{~icon_img (default icon "download")~}}
2222
{{default title "Download"}}
2323
</a>

0 commit comments

Comments
 (0)