Skip to content

Commit 698e424

Browse files
committed
icon button documentation
1 parent 907a61d commit 698e424

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
- Avoid vertical scrolling caused by the footer even when the page content is short.
1616
- Add a new `compact` attribute to the [list](https://sql.ophir.dev/documentation.sql?component=list#component), allowing to display more items in a list without taking up too much space. Great for displaying long lists of items.
1717
- ![compact list screenshot](https://github.com/lovasoa/SQLpage/assets/552629/41302807-c6e4-40a0-9486-bfd0ceae1537)
18+
- Add property `narrow` to the [button](https://sql.ophir.dev/documentation.sql?component=button#component) component to make the button narrower. Ideal for buttons with icons.
19+
- ![icon buttons](https://github.com/lovasoa/SQLpage/assets/552629/7fcc049e-6012-40c1-a8ee-714ce70a8763)
1820

1921
## 0.23.0 (2024-06-09)
2022

examples/official-site/sqlpage/migrations/18_button.sql

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,20 @@ INSERT INTO example(component, description, properties) VALUES
5151
{"link":"#", "color":"info", "title":"Info"},
5252
{"link":"#", "color":"dark", "title":"Dark"},
5353
{"link":"#", "color":"warning", "title":"Warning"},
54-
{"link":"#", "color":"danger", "title":"Narrow", "narrow":true}]')
54+
{"link":"#", "color":"danger", "title":"Narrow"}]')
55+
);
56+
57+
INSERT INTO example(component, description, properties) VALUES
58+
('button', 'Icon buttons using the narrow property',
59+
json('[{"component":"button"},
60+
{"link":"#", "narrow":true, "icon":"edit", "color":"primary", "tooltip":"Edit" },
61+
{"link":"#", "narrow":true, "icon":"trash", "color":"danger", "tooltip":"Delete" },
62+
{"link":"#", "narrow":true, "icon":"corner-down-right", "color":"info", "tooltip":"Preview" },
63+
{"link":"#", "narrow":true, "icon":"download", "color":"success", "tooltip":"Download" },
64+
{"link":"#", "narrow":true, "icon":"upload", "color":"warning", "tooltip":"Upload" },
65+
{"link":"#", "narrow":true, "icon":"info-circle", "color":"cyan", "tooltip":"Info" },
66+
{"link":"#", "narrow":true, "icon":"help-circle", "color":"purple", "tooltip":"Help" },
67+
{"link":"#", "narrow":true, "icon":"settings", "color":"indigo", "tooltip":"Settings" }]')
5568
);
5669

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

0 commit comments

Comments
 (0)