Skip to content

Commit

Permalink
fixed width CSS + hooks and function order
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchan0394 committed Mar 25, 2022
1 parent 1cade53 commit 6676deb
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const MaxLineStyled = styled.div`
`;

const BlockStyled = styled.div`
width: 100%;
${({ wide }: any) => wide && 'width: 100%;'}
`;

// #endregion
Expand Down Expand Up @@ -69,14 +69,14 @@ export default function TextFieldInput({
}: Props) {
const [isEditState, setIsEdit] = useState(isEdit);

const handlePreview = () => {
setIsEdit(!isEditState);
};

useEffect(() => {
setIsEdit(isEdit);
}, [isEdit]);

const handlePreview = () => {
setIsEdit(!isEditState);
};

const readOnlyContent = (
<>
{isMarkDown ? (
Expand Down Expand Up @@ -129,7 +129,7 @@ export default function TextFieldInput({
</>
);
const loadableContent = isEditState ? (
<BlockStyled>
<BlockStyled wide={wide}>
<TextInput
id={id}
value={value ?? ''}
Expand Down

0 comments on commit 6676deb

Please sign in to comment.