Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CSV button size top-level parameter #391

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
('title', 'The text displayed on the download button.', 'TEXT', TRUE, FALSE),
('filename', 'The name of the file that should be downloaded (without the extension).', 'TEXT', TRUE, TRUE),
('icon', 'Name of the icon (from tabler-icons.io) to display in the button.', 'ICON', TRUE, TRUE),
('color', 'Color of the button', 'COLOR', TRUE, TRUE)
('color', 'Color of the button', 'COLOR', TRUE, TRUE),
('size', 'The size of the button (e.g., sm, lg).', 'TEXT', TRUE, TRUE)
) x;

INSERT INTO example(component, description, properties) VALUES
Expand Down
2 changes: 1 addition & 1 deletion sqlpage/templates/csv.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{~/each_row~}}
"
download="{{default filename title}}.csv"
class="btn btn-{{default color "primary"}}">
class="btn btn-{{default color "primary"}}{{#if size}} btn-{{size}}{{/if}}">
{{~icon_img (default icon "download")~}}
{{default title "Download"}}
</a>
Expand Down