fix: add team member dialog ui updated (#5675)

* fix: add team member dialog ui updated
fixed team url

Signed-off-by: Udit Takkar <[email protected]>

* fix: type errors and role value bug

Signed-off-by: Udit Takkar <[email protected]>

* chore: remove logs

Signed-off-by: Udit Takkar <[email protected]>

* chore: change option to admin

Signed-off-by: Udit Takkar <[email protected]>

Signed-off-by: Udit Takkar <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
Udit Takkarandsean-brydon authored and GitHub committed 2022-11-25 12:59:25 +00:00
1 parent 93a14b190e
commit eda1d5f393
6 files changed
+42 -32

No files matched your search

@@ -8,6 +8,7 @@ type Props = InputHTMLAttributes<HTMLInputElement> & {
descriptionAsLabel?: boolean;
informationIconText?: string;
error?: boolean;
className?: string;
};
const CheckboxField = forwardRef<HTMLInputElement, Props>(
@@ -53,7 +54,8 @@ const CheckboxField = forwardRef<HTMLInputElement, Props>(
!error && disabled
? "bg-gray-300 checked:bg-gray-300"
: "checked:bg-gray-800 hover:bg-gray-100",
error && "border-red-800 checked:bg-red-800 hover:bg-red-400"
error && "border-red-800 checked:bg-red-800 hover:bg-red-400",
rest.className
)}
/>
</div>
+8 -3
View File
@@ -7,9 +7,10 @@ export const ToggleGroupItem = () => <div>hi</div>;
interface ToggleGroupProps extends Omit<RadixToggleGroup.ToggleGroupSingleProps, "type"> {
options: { value: string; label: string }[];
isFullWidth?: boolean;
}
export const ToggleGroup = ({ options, onValueChange, ...props }: ToggleGroupProps) => {
export const ToggleGroup = ({ options, onValueChange, isFullWidth, ...props }: ToggleGroupProps) => {
const [value, setValue] = useState<string | undefined>(props.defaultValue);
const [activeToggleElement, setActiveToggleElement] = useState<null | HTMLButtonElement>(null);
@@ -25,7 +26,8 @@ export const ToggleGroup = ({ options, onValueChange, ...props }: ToggleGroupPro
onValueChange={setValue}
className={classNames(
"dark:border-darkgray-200 relative inline-flex rounded-md border border-gray-200 p-1",
props.className
props.className,
isFullWidth && "w-full"
)}>
{/* Active toggle. It's a separate element so we can animate it nicely. */}
<span
@@ -37,7 +39,10 @@ export const ToggleGroup = ({ options, onValueChange, ...props }: ToggleGroupPro
<RadixToggleGroup.Item
key={option.value}
value={option.value}
className="relative rounded-[4px] px-3 py-1 text-sm dark:text-neutral-200 [&[aria-checked='false']]:hover:font-medium"
className={classNames(
"relative rounded-[4px] px-3 py-1 text-sm dark:text-neutral-200 [&[aria-checked='false']]:hover:font-medium",
isFullWidth && "w-full"
)}
ref={(node) => {
if (node && value === option.value) {
setActiveToggleElement(node);