Skip to content

Commit 58b6191

Browse files
authored
Merge pull request #391 from bruceus/csv-button-size
Added CSV button size top-level parameter
2 parents e22362e + ab37a40 commit 58b6191

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)