-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2defe6
commit c174802
Showing
23 changed files
with
649 additions
and
541 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 |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import { ReactElement } from "react"; | ||
import { FormField, FlowLayout, FormFieldLabel, FormFieldHelperText, Input } from "@salt-ds/core"; | ||
import { | ||
FormField, | ||
FlowLayout, | ||
FormFieldLabel, | ||
FormFieldHelperText, | ||
Input, | ||
} from "@salt-ds/core"; | ||
|
||
export const Default = (): ReactElement => ( | ||
<FlowLayout style={{ width: "256px" }}> | ||
<FormField> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
</FlowLayout> | ||
<FormField> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
</FlowLayout> | ||
); |
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,12 +1,18 @@ | ||
import { ReactElement } from "react"; | ||
import { FormField, FlowLayout, FormFieldLabel, FormFieldHelperText, Input } from "@salt-ds/core"; | ||
import { | ||
FormField, | ||
FlowLayout, | ||
FormFieldLabel, | ||
FormFieldHelperText, | ||
Input, | ||
} from "@salt-ds/core"; | ||
|
||
export const Disabled = (): ReactElement => ( | ||
<FlowLayout style={{ width: "256px" }}> | ||
<FormField disabled> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
</FlowLayout> | ||
<FormField disabled> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
</FlowLayout> | ||
); |
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,34 +1,41 @@ | ||
import { ReactElement } from "react"; | ||
import { FormField, FormFieldLabelPlacement, StackLayout, FormFieldLabel, FormFieldHelperText, Input } from "@salt-ds/core"; | ||
import { | ||
FormField, | ||
FormFieldLabelPlacement, | ||
StackLayout, | ||
FormFieldLabel, | ||
FormFieldHelperText, | ||
Input, | ||
} from "@salt-ds/core"; | ||
|
||
export const GroupedWithLabelLeft = (): ReactElement => { | ||
const groupedProps: { labelPlacement: FormFieldLabelPlacement } = { | ||
labelPlacement: "left", | ||
}; | ||
return ( | ||
<StackLayout> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label left</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel> | ||
Form Field label that's extra long. Showing that labels wrap around to | ||
the line. | ||
</FormFieldLabel> | ||
<Input defaultValue="Primary Input value" /> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Primary Input value" /> | ||
</FormField> | ||
</StackLayout> | ||
); | ||
}; | ||
const groupedProps: { labelPlacement: FormFieldLabelPlacement } = { | ||
labelPlacement: "left", | ||
}; | ||
|
||
return ( | ||
<StackLayout> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label left</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel> | ||
Form Field label that's extra long. Showing that labels wrap around to | ||
the line. | ||
</FormFieldLabel> | ||
<Input defaultValue="Primary Input value" /> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Value" /> | ||
<FormFieldHelperText>Helper text</FormFieldHelperText> | ||
</FormField> | ||
<FormField {...groupedProps}> | ||
<FormFieldLabel>Form Field label</FormFieldLabel> | ||
<Input defaultValue="Primary Input value" /> | ||
</FormField> | ||
</StackLayout> | ||
); | ||
}; |
Oops, something went wrong.