mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 05:34:09 +00:00
fix: small style tweaks and bug fixes
fix: remove interactive styles from display elements fix: automation form reset on submit fix: prevent empty image src
This commit is contained in:
committed by
Carlos Valente
parent
902edf4a85
commit
836fa52757
+1
-1
@@ -27,7 +27,7 @@
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&:hover:not(.disabled) {
|
||||
background-color: $gray-1100;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
+13
-3
@@ -7,12 +7,22 @@ import style from './TextLikeInput.module.scss';
|
||||
interface TextLikeInputProps extends HTMLAttributes<HTMLSpanElement> {
|
||||
offset?: 'over' | 'under' | 'muted' | null;
|
||||
muted?: boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const TextLikeInput = forwardRef(
|
||||
({ offset, muted, children, className, ...elementProps }: PropsWithChildren<TextLikeInputProps>, textRef) => {
|
||||
(
|
||||
{ offset, muted, disabled, children, className, ...elementProps }: PropsWithChildren<TextLikeInputProps>,
|
||||
textRef,
|
||||
) => {
|
||||
const ref = useRef<HTMLDivElement | null>(null);
|
||||
const classes = cx([style.textInput, offset && style[offset], muted && style.muted, className]);
|
||||
const classes = cx([
|
||||
style.textInput,
|
||||
offset && style[offset],
|
||||
muted && style.muted,
|
||||
disabled && style.disabled,
|
||||
className,
|
||||
]);
|
||||
|
||||
useImperativeHandle(textRef, () => {
|
||||
return {
|
||||
@@ -23,7 +33,7 @@ const TextLikeInput = forwardRef(
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={classes} tabIndex={0} {...elementProps} ref={ref}>
|
||||
<div className={classes} tabIndex={disabled ? -1 : 0} {...elementProps} ref={ref}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user