
* Type fixes * Type fixes * Attemp to prevent unknown error in prod * Type fixes * Type fixes for onboarding * Extracts ConnectIntegration * Extracts IntegrationListItem * Extracts CalendarsList * Uses CalendarList on onboarding * Removes deprecated Alert * Extracts DisconnectIntegration * Extracts CalendarSwitch * Extracts ConnectedCalendarsList * Extracted connectedCalendar logic for reuse * Extracted SubHeadingTitleWithConnections * Type fixes * Fetched connected calendars in onboarding * Refreshes data on when adding/removing calendars on onboarding * Removed testing code * Type fixes * Feedback * Moved integration helpers * I was sleepy Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import React from "react";
|
|
|
|
interface UsernameInputProps extends React.ComponentPropsWithRef<"input"> {
|
|
label?: string;
|
|
}
|
|
|
|
const UsernameInput = React.forwardRef<HTMLInputElement, UsernameInputProps>((props, ref) => (
|
|
// todo, check if username is already taken here?
|
|
<div>
|
|
<label htmlFor="username" className="block text-sm font-medium text-gray-700">
|
|
{props.label ? props.label : "Username"}
|
|
</label>
|
|
<div className="flex mt-1 rounded-md shadow-sm">
|
|
<span className="inline-flex items-center px-3 text-gray-500 border border-r-0 border-gray-300 rounded-l-sm bg-gray-50 sm:text-sm">
|
|
{process.env.NEXT_PUBLIC_APP_URL}/{props.label && "team/"}
|
|
</span>
|
|
<input
|
|
ref={ref}
|
|
type="text"
|
|
name="username"
|
|
id="username"
|
|
autoComplete="username"
|
|
required
|
|
{...props}
|
|
className="flex-grow block w-full min-w-0 lowercase border-gray-300 rounded-none rounded-r-sm focus:ring-black focus:border-black sm:text-sm"
|
|
/>
|
|
</div>
|
|
</div>
|
|
));
|
|
|
|
UsernameInput.displayName = "UsernameInput";
|
|
|
|
export { UsernameInput };
|