mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-17 04:47:02 +00:00
Add guest access for rooms
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { forwardRef } from "react";
|
||||
import classNames from "classnames";
|
||||
import styles from "./Input.module.css";
|
||||
import { ReactComponent as CheckIcon } from "./icons/Check.svg";
|
||||
|
||||
export function FieldRow({ children, rightAlign, className, ...rest }) {
|
||||
return (
|
||||
@@ -21,11 +22,23 @@ export function Field({ children, className, ...rest }) {
|
||||
}
|
||||
|
||||
export const InputField = forwardRef(
|
||||
({ id, label, className, ...rest }, ref) => {
|
||||
({ id, label, className, type, checked, ...rest }, ref) => {
|
||||
return (
|
||||
<Field>
|
||||
<input id={id} {...rest} ref={ref} />
|
||||
<label htmlFor={id}>{label}</label>
|
||||
<Field
|
||||
className={classNames(
|
||||
type === "checkbox" ? styles.checkboxField : styles.inputField,
|
||||
className
|
||||
)}
|
||||
>
|
||||
<input id={id} {...rest} ref={ref} type={type} checked={checked} />
|
||||
<label htmlFor={id}>
|
||||
{type === "checkbox" && (
|
||||
<div className={styles.checkbox}>
|
||||
<CheckIcon />
|
||||
</div>
|
||||
)}
|
||||
{label}
|
||||
</label>
|
||||
</Field>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user