-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lemon-ui): Clarify field components with
LemonField
naming (…
- Loading branch information
Showing
59 changed files
with
504 additions
and
516 deletions.
There are no files selected for viewing
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
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,15 +1,15 @@ | ||
import { LemonInput } from '@posthog/lemon-ui' | ||
import { Field } from 'lib/forms/Field' | ||
import { LemonField } from 'lib/lemon-ui/LemonField' | ||
|
||
export default function SignupReferralSource({ disabled }: { disabled: boolean }): JSX.Element { | ||
return ( | ||
<Field name="referral_source" label="Where did you hear about us?" showOptional> | ||
<LemonField name="referral_source" label="Where did you hear about us?" showOptional> | ||
<LemonInput | ||
className="ph-ignore-input" | ||
data-attr="signup-referral-source" | ||
placeholder="" | ||
disabled={disabled} | ||
/> | ||
</Field> | ||
</LemonField> | ||
) | ||
} |
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,9 +1,9 @@ | ||
import { LemonInput, LemonSegmentedButton, LemonSegmentedButtonOption, lemonToast, Link } from '@posthog/lemon-ui' | ||
import { useActions, useValues } from 'kea' | ||
import { Form } from 'kea-forms' | ||
import { Field } from 'lib/forms/Field' | ||
import { useUploadFiles } from 'lib/hooks/useUploadFiles' | ||
import { IconBugReport, IconFeedback, IconHelpOutline } from 'lib/lemon-ui/icons' | ||
import { LemonField } from 'lib/lemon-ui/LemonField' | ||
import { LemonFileInput } from 'lib/lemon-ui/LemonFileInput/LemonFileInput' | ||
import { LemonSelect } from 'lib/lemon-ui/LemonSelect/LemonSelect' | ||
import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea' | ||
|
@@ -73,43 +73,43 @@ export function SupportForm(): JSX.Element | null { | |
> | ||
{!user && ( | ||
<> | ||
<Field name="name" label="Name"> | ||
<LemonField name="name" label="Name"> | ||
<LemonInput data-attr="name" placeholder="Jane" /> | ||
</Field> | ||
<Field name="email" label="Email"> | ||
</LemonField> | ||
<LemonField name="email" label="Email"> | ||
<LemonInput data-attr="email" placeholder="[email protected]" /> | ||
</Field> | ||
</LemonField> | ||
</> | ||
)} | ||
<Field name="kind" label="What type of message is this?"> | ||
<LemonField name="kind" label="What type of message is this?"> | ||
<LemonSegmentedButton fullWidth options={SUPPORT_TICKET_OPTIONS} /> | ||
</Field> | ||
<Field name="target_area" label="What area does this best relate to?"> | ||
</LemonField> | ||
<LemonField name="target_area" label="What area does this best relate to?"> | ||
<LemonSelect | ||
fullWidth | ||
options={Object.entries(TARGET_AREA_TO_NAME).map(([key, value]) => ({ | ||
label: value, | ||
value: key, | ||
}))} | ||
/> | ||
</Field> | ||
<Field name="severity_level" label="What is the severity of this issue?"> | ||
</LemonField> | ||
<LemonField name="severity_level" label="What is the severity of this issue?"> | ||
<LemonSelect | ||
fullWidth | ||
options={Object.entries(SEVERITY_LEVEL_TO_NAME).map(([key, value]) => ({ | ||
label: value, | ||
value: key, | ||
}))} | ||
/> | ||
</Field> | ||
</LemonField> | ||
<span className="text-muted"> | ||
Check out the{' '} | ||
<Link target="_blank" to="https://posthog.com/docs/support-options#severity-levels"> | ||
severity level definitions | ||
</Link> | ||
. | ||
</span> | ||
<Field | ||
<LemonField | ||
name="message" | ||
label={sendSupportRequest.kind ? SUPPORT_TICKET_KIND_TO_PROMPT[sendSupportRequest.kind] : 'Content'} | ||
> | ||
|
@@ -132,7 +132,7 @@ export function SupportForm(): JSX.Element | null { | |
)} | ||
</div> | ||
)} | ||
</Field> | ||
</LemonField> | ||
</Form> | ||
) | ||
} |
Oops, something went wrong.