-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation page for CfaV2FormBuilder
Adds text input Still needs: - Remaining implemented fields - Styles for form builder methods
- Loading branch information
Showing
17 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<% content_for(:template_name) { "styleguide" } %> | ||
|
||
<section class="slab slab--styleguide"> | ||
<div class="grid"> | ||
<div class="grid__item"> | ||
<h1>CfaV2FormBuilder</h1> | ||
<p class="text--help">CfAV2FormBuilder is a helper that generates accessible form fields for the styleguide.</p> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<%= render 'section', title: 'Text Input', example: 'form_builder/v2/cfa_text_input' %> | ||
<%#= render 'section', title: 'Radio Button', example: 'form_builder/v2/cfa_radio' %> | ||
<%#= render 'section', title: 'Radiogroup', example: 'form_builder/v2/cfa_radiogroup' %> | ||
<%#= render 'section', title: 'Select', example: 'form_builder/v2/cfa_select' %> | ||
<%#= render 'section', title: 'Date Input', example: 'form_builder/v2/cfa_date_input' %> | ||
<%#= render 'section', title: 'Checkbox', example: 'form_builder/v2/cfa_checkbox' %> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<%= fields_for(:form, @form, builder: Cfa::Styleguide::CfaV2FormBuilder) do |f| %> | ||
<%= f.cfa_text_input(:example_method_name, 'Example input') %> | ||
<%= f.cfa_text_input(:example_method_name, 'Example input (required)', required: true) %> | ||
<%= f.cfa_text_input(:example_method_name, 'Example input with help text', help_text: "You could answer this any way you like.") %> | ||
<%= f.cfa_text_input(:example_method_name, 'Example input with wrapper class', wrapper_classes: ['blue']) %> | ||
<%= f.cfa_text_input(:example_method_name, 'Example input with options', options: { placeholder: 'Enter text here.' }) %> | ||
<%= f.cfa_text_input(:example_method_with_validation, 'Example input with error') %> | ||
<% end %> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Cfa::Styleguide::Engine.routes.draw do | ||
get "/styleguide" => "pages#index", as: :styleguide_main | ||
get "/styleguide/form-builder" => "pages#form_builder", as: :styleguide_form_builder | ||
get "/styleguide/form-builder/v1" => "pages#form_builder_v1", as: :styleguide_form_builder_v1 | ||
get "/styleguide/form-builder/v2" => "pages#form_builder_v2", as: :styleguide_form_builder_v2 | ||
get "/styleguide/examples/*example_path" => "examples#show", as: :styleguide_example | ||
get "/styleguide/emojis" => "pages#emojis", as: :styleguide_emojis | ||
end |
This file contains 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