-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add FormFieldGroup component and density example (#2865)
Fixes: #2805, #2806, #2820, [#2807](#2807) [category:Components] Release Note: - We've added a new `FormFieldGroup` component to use when grouping inputs like checkboxes and radio inputs that need to be associated to one another. Its API matches the `FormField` API where you have `error` prop as well as `id` `isRequired` and `orienation`. - `orientation` has been added back to `useFormFieldModel` to better support sub component styling. - Styles have been cleaned up to use `gap` for proper spacing between labels, inputs and hint text. - Added a new `FormField.Field` component to ensure proper alignment between label and inputs regardless of orientation and hint text. Ensure to wrap your inputs and hint text in this component. Co-authored-by: manuel.carrera <[email protected]> Co-authored-by: @josh-bagwell <[email protected]> Co-authored-by: @RayRedGoose <[email protected]>
- Loading branch information
1 parent
442af05
commit 87dbe31
Showing
124 changed files
with
2,150 additions
and
766 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
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,12 @@ | ||
import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; | ||
import {Density} from './examples/Density'; | ||
|
||
<Meta title="Examples/Forms/Density and Alignment" /> | ||
|
||
# Canvas Kit Density Examples | ||
|
||
Although we currently don't support a density system, it's common practice to provide varying | ||
options to users, especially in the context of forms. Below is an example of how you can style our | ||
from elements to achieve the desired density. | ||
|
||
<ExampleCodeBlock code={Density} /> |
Oops, something went wrong.