diff --git a/tools/ui-components/src/colors.css b/tools/ui-components/src/colors.css
index b23123ef2a..5b2108a423 100644
--- a/tools/ui-components/src/colors.css
+++ b/tools/ui-components/src/colors.css
@@ -118,6 +118,7 @@ html.dark,
div.dark {
--default-foreground-primary: var(--gray00);
--default-foreground-secondary: var(--gray05);
+ --default-foreground-tertiary: var(--gray10);
--default-foreground-quaternary: var(--gray15);
--default-foreground-danger: var(--red90);
--default-foreground-info: var(--blue90);
diff --git a/tools/ui-components/src/form-control/form-control-feedback.tsx b/tools/ui-components/src/form-control/form-control-feedback.tsx
new file mode 100644
index 0000000000..707a79c9e3
--- /dev/null
+++ b/tools/ui-components/src/form-control/form-control-feedback.tsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import { FormControlVariationProps } from './types';
+
+export const FormControlFeedback = ({
+ children,
+ className,
+ testId
+}: FormControlVariationProps) => {
+ const defaultClasses =
+ 'absolute top-0 right-0 z-2 block w-8 h-8 leading-8 ' +
+ 'text-center pointer-events-none text-green-700';
+
+ const classes = [defaultClasses, className].join(' ');
+ return (
+
+ {children}
+
+ );
+};
diff --git a/tools/ui-components/src/form-control/form-control-static.tsx b/tools/ui-components/src/form-control/form-control-static.tsx
new file mode 100644
index 0000000000..c8d2a1f1ea
--- /dev/null
+++ b/tools/ui-components/src/form-control/form-control-static.tsx
@@ -0,0 +1,19 @@
+import React from 'react';
+
+import { FormControlVariationProps } from './types';
+
+export const FormControlStatic = ({
+ className,
+ children,
+ testId
+}: FormControlVariationProps) => {
+ const defaultClasses =
+ 'py-1.5 mb-0 min-h-43-px text-default-foreground-secondary';
+
+ const classes = [defaultClasses, className].join(' ');
+ return (
+
+ {children}
+
+ );
+};
diff --git a/tools/ui-components/src/form-control/form-control.stories.tsx b/tools/ui-components/src/form-control/form-control.stories.tsx
new file mode 100644
index 0000000000..76e8eec250
--- /dev/null
+++ b/tools/ui-components/src/form-control/form-control.stories.tsx
@@ -0,0 +1,53 @@
+import React from 'react';
+import { Story } from '@storybook/react';
+import { FormControl, FormControlProps, FormControlVariationProps } from '.';
+
+const story = {
+ title: 'Example/FormControl',
+ component: FormControl
+};
+
+const DefaultTemplate: Story = args => {
+ return ;
+};
+
+export const Default = DefaultTemplate.bind({});
+Default.args = {
+ // default props go here
+};
+
+const StaticTemplate: Story = args => {
+ return ;
+};
+
+export const Static = StaticTemplate.bind({});
+Static.args = {
+ children: 'foo@bar.com'
+};
+
+const FeedBackTemplate: Story = args => {
+ return ;
+};
+
+const checkMark = (
+
+);
+
+export const Feedback = FeedBackTemplate.bind({});
+Feedback.args = {
+ children: checkMark
+};
+
+export default story;
diff --git a/tools/ui-components/src/form-control/form-control.test.tsx b/tools/ui-components/src/form-control/form-control.test.tsx
new file mode 100644
index 0000000000..c1666143f8
--- /dev/null
+++ b/tools/ui-components/src/form-control/form-control.test.tsx
@@ -0,0 +1,25 @@
+import React from 'react';
+import { render, screen } from '@testing-library/react';
+
+import { FormControl } from '.';
+
+describe('', () => {
+ it('should render correctly', () => {
+ render();
+ expect(screen.getByTestId('test')).toBeInTheDocument();
+ });
+});
+
+describe('', () => {
+ it('should render correctly', () => {
+ render();
+ expect(screen.getByTestId('test')).toBeInTheDocument();
+ });
+});
+
+describe('', () => {
+ it('should render correctly', () => {
+ render();
+ expect(screen.getByTestId('test')).toBeInTheDocument();
+ });
+});
diff --git a/tools/ui-components/src/form-control/form-control.tsx b/tools/ui-components/src/form-control/form-control.tsx
new file mode 100644
index 0000000000..7a8fcbc8a8
--- /dev/null
+++ b/tools/ui-components/src/form-control/form-control.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+
+import { FormControlFeedback as Feedback } from './form-control-feedback';
+import { FormControlStatic as Static } from './form-control-static';
+import { FormControlProps } from './types';
+
+const FormControl = React.forwardRef(
+ ({ className, id, testId }, ref): JSX.Element => {
+ const defaultClasses =
+ 'outline-0 block w-full h-8 py-1.5 px-2.5 text-md text-default-foreground-primary ' +
+ 'bg-default-background-primary bg-none rounded-none border-1 border-solid ' +
+ 'border-default-background-quaternary shadow-none ' +
+ 'transition ease-in-out duration-150 focus:border-default-foreground-tertiary';
+
+ const classes = [defaultClasses, className].join(' ');
+ return ;
+ }
+);
+const MainFormControl = Object.assign(FormControl, { Feedback, Static });
+
+FormControl.displayName = 'FormControl';
+export { MainFormControl as FormControl };
diff --git a/tools/ui-components/src/form-control/index.ts b/tools/ui-components/src/form-control/index.ts
new file mode 100644
index 0000000000..9a39cc761e
--- /dev/null
+++ b/tools/ui-components/src/form-control/index.ts
@@ -0,0 +1,2 @@
+export { FormControl } from './form-control';
+export type { FormControlProps, FormControlVariationProps } from './types';
diff --git a/tools/ui-components/src/form-control/types.ts b/tools/ui-components/src/form-control/types.ts
new file mode 100644
index 0000000000..78256b78eb
--- /dev/null
+++ b/tools/ui-components/src/form-control/types.ts
@@ -0,0 +1,12 @@
+export interface FormControlProps {
+ className?: string;
+ id?: string;
+ testId?: string;
+}
+
+export interface FormControlVariationProps {
+ className?: string;
+ children?: React.ReactNode;
+ id?: string;
+ testId?: string;
+}
diff --git a/tools/ui-components/tailwind.config.js b/tools/ui-components/tailwind.config.js
index ffdf785e23..eb6d544b51 100644
--- a/tools/ui-components/tailwind.config.js
+++ b/tools/ui-components/tailwind.config.js
@@ -72,6 +72,7 @@ module.exports = {
}
},
borderWidth: {
+ 1: '1px',
3: '3px'
},
fontSize: {
@@ -80,6 +81,14 @@ module.exports = {
sm: ['16px', '1.5'],
md: ['18px', '1.42857143'],
lg: ['24px', '1.3333333']
+ },
+ minHeight: {
+ '43-px': '43px'
+ },
+ extend: {
+ zIndex: {
+ 2: '2'
+ }
}
},
plugins: []