-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Moving FormField as a organism-level component
- Loading branch information
1 parent
5b122f1
commit cc70d6f
Showing
8 changed files
with
32 additions
and
26 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
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
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
8 changes: 4 additions & 4 deletions
8
src/components/molecules/FormField/index.tsx → src/components/organisms/FormField/index.tsx
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 @@ | ||
export { default as FormField } from './FormField' |
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,24 @@ | ||
// COMMON PROPS | ||
import { ElementProps } from './commonProps' | ||
// COMPONENT PROPS | ||
import { InputControlProps } from './moleculeProps' | ||
// TYPES & INTERFACES | ||
import { basicColorType } from '../types/styleTypes' | ||
|
||
export interface FormFieldHelperProps { | ||
text?: string | ||
color?: basicColorType | ||
} | ||
|
||
export interface FormFieldProps extends ElementProps { | ||
/** `Attribute` Sets a custom text before the wrapped input to indicate its usage */ | ||
labelText?: string | ||
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */ | ||
inputControlConfig: InputControlProps | InputControlProps[] | ||
/** `Attribute` Adds a helper text below the wrapped paragraph to provide context information */ | ||
helperConfig?: FormFieldHelperProps | ||
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */ | ||
isHorizontal?: boolean | ||
/** `Styling` Will group the list of inputs in a same wrapper (useful for several inputs with same usage, as a complex address) */ | ||
isGrouped?: boolean | ||
} |