Updated links model and poll page (#206)

* Improved sharing
* Updated desktop poll
This commit is contained in:
Luke Vella 2022-06-27 15:22:23 +01:00 committed by GitHub
parent c4cbf2f6bb
commit 2ead375b42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 955 additions and 1848 deletions

View file

@ -7,18 +7,28 @@ export interface TextInputProps
HTMLInputElement
> {
error?: boolean;
proportions?: "lg" | "md";
}
export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
function TextInput({ className, error, ...forwardProps }, ref) {
function TextInput(
{ className, error, proportions: size = "md", ...forwardProps },
ref,
) {
return (
<input
ref={ref}
type="text"
className={clsx("input", className, {
"input-error": error,
"bg-slate-50 text-slate-500": forwardProps.disabled,
})}
className={clsx(
"appearance-none rounded-md border border-gray-300 text-slate-700 shadow-sm placeholder:text-slate-400 focus:border-primary-500 focus:ring-1 focus:ring-primary-500",
className,
{
"px-2 py-1": size === "md",
"px-3 py-2 text-xl": size === "lg",
"input-error": error,
"bg-slate-50 text-slate-500": forwardProps.disabled,
},
)}
{...forwardProps}
/>
);