Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add InputPassword component #86

Merged
merged 3 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion app/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import {
Checkbox,
Container,
Button,
InputText,
InputPassword,
} from "@washingtonpost/wpds-ui-kit";
import Chart from "@washingtonpost/wpds-assets/asset/chart";
import Settings from "@washingtonpost/wpds-assets/asset/settings";

const Headline = styled("h1", {
paddingTop: "$200",
Expand Down Expand Up @@ -44,7 +47,7 @@ function HomePage() {
<Headline>Server Side Testing</Headline>
<SubHeadline>Testing ground / playground</SubHeadline>
<p>
All code in this app is meant for testing components that use objects
All code in this app is meant for testing InputTexts that use objects
that are only available in JavaScript in the brower.
</p>

Expand Down Expand Up @@ -115,6 +118,76 @@ function HomePage() {
</HStack>
</>
</HStack>

<h2>InputText</h2>
<HStack>
<InputText label="Label" id="it-1" />
<InputText
label="Label"
helperText="Helper text"
defaultValue="Input text"
id="it-2"
/>
<InputText label="Icon" defaultValue="Left" icon="left" id="it-3">
<Icon label="">
<Settings />
</Icon>
</InputText>
<InputText
label="Icon"
defaultValue="Right"
icon="right"
buttonIconText="Settings"
id="it-4"
>
<Icon label="">
<Settings />
</Icon>
</InputText>
</HStack>
<HStack>
<InputText
label="Type"
defaultValue="Search"
type="search"
id="it-5"
/>
<InputText label="Type" defaultValue="Url" type="url" id="it-6" />
<InputText label="Type" defaultValue="Tel" type="tel" id="it-7" />
<InputText label="Type" defaultValue="Email" type="email" id="it-8" />
</HStack>
<HStack>
<InputText
label="Behavior"
defaultValue="Disabled"
disabled
id="it-9"
/>
<InputText
label="Behavior"
defaultValue="Error"
error
errorMessage="Error Message"
id="it-10"
/>
<InputText
label="Behavior"
defaultValue="Success"
success
id="it-11"
/>
<InputText
label="Behavior"
defaultValue="Required"
required
id="it-12"
/>
</HStack>
<h2>InputPassword</h2>
<HStack>
<InputPassword id="ip-1" />
<InputPassword id="ip-2" defaultValue="12345" />
</HStack>
</Stack>
</>
);
Expand Down
Loading