This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You'll need to update the following variables: | |
- ENV['APP_NAME'] | |
- ENV['COMPANY_ADDRESS'] | |
- ENV['HOST'] | |
Make sure you have app/assets/images/logo.svg for this line: | |
helpers.image_url('logo.svg') | |
And also update the CSS variables to match your color scheme: | |
:root { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module PhlexUI | |
class Form::Builder < Base | |
# include Phlex::Rails::Helpers::FormAuthenticityToken | |
def initialize(model: nil, scope: nil, url: nil, format: nil, method: :post, **attrs) | |
@object = model | |
@scope = scope | |
@url = url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
SimpleForm.setup do |config| | |
# Button class (already Tailwind) | |
config.button_class = "relative inline-flex items-center rounded-md bg-sky-600 px-2.5 py-2 text-sm font-semibold text-white shadow-xs hover:bg-sky-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-600" | |
# Boolean label class (tailwind switch) | |
config.boolean_label_class = "ml-2 text-sm font-medium text-gray-700" | |
config.label_text = lambda { |label, required, explicit_label| "#{label} #{required}" } |
OlderNewer