|
1 | 1 | module ApplicationHelper |
2 | 2 |
|
3 | | - def link_to_button(text, url, variant: :secondary, **options) |
| 3 | + def link_to_button(text, url, variant: :secondary_outline, **options) |
4 | 4 | manual_classes = options.delete(:class) |
5 | 5 | base_classes = "inline-flex items-center gap-2 px-4 py-2 rounded-lg |
6 | 6 | transition-colors duration-200 font-medium shadow-sm text-sm" |
7 | 7 | variant_classes = { |
8 | | - primary: "border border-blue-600 text-grey-600 hover:bg-blue-600 hover:text-white", |
9 | | - secondary: "border border-gray-400 text-gray-600 hover:bg-gray-600 hover:text-white", |
10 | | - info: "border border-sky-500 text-gray-600 hover:bg-sky-600 hover:text-white", |
11 | | - warning: "border border-yellow-400 text-gray-600 hover:bg-yellow-500 hover:text-white", |
12 | | - danger: "border border-red-600 text-gray-600 hover:bg-red-600 hover:text-white", |
13 | | - utility: "border border-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-800" |
| 8 | + primary: "border border-blue-600 bg-blue-600 text-white hover:text-grey-600 hover:bg-white", |
| 9 | + secondary: "border border-gray-400 bg-gray-600 text-white hover:text-grey-600 hover:bg-white", |
| 10 | + info: "border border-sky-500 bg-sky-600 text-white hover:text-grey-600 hover:bg-white", |
| 11 | + warning: "border border-yellow-400 bg-yellow-600 text-white hover:text-grey-600 hover:bg-white", |
| 12 | + danger: "border border-red-600 bg-red-600 text-white hover:text-grey-600 hover:bg-white", |
| 13 | + utility: "border border-gray-200 bg-gray-200 text-gray-800 hover:text-gray-600 hover:bg-white", |
| 14 | + |
| 15 | + primary_outline: "border border-blue-600 text-grey-600 hover:bg-blue-600 hover:text-white", |
| 16 | + secondary_outline: "border border-gray-400 text-gray-600 hover:bg-gray-600 hover:text-white", |
| 17 | + info_outline: "border border-sky-500 text-gray-600 hover:bg-sky-600 hover:text-white", |
| 18 | + warning_outline: "border border-yellow-400 text-gray-600 hover:bg-yellow-500 hover:text-white", |
| 19 | + danger_outline: "border border-red-600 text-gray-600 hover:bg-red-600 hover:text-white", |
| 20 | + utility_outline: "border border-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-800" |
| 21 | + # border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 |
14 | 22 | } |
15 | 23 | classes = [base_classes, variant_classes[variant.to_sym], manual_classes].join(" ") |
16 | 24 | link_to text, url, options.merge(class: classes) |
|
0 commit comments