extract OutfitNameEditButton

This commit is contained in:
Matt Dunn-Rankin 2020-04-22 04:04:02 -07:00
parent 09b928865e
commit 255b77d0cf

View file

@ -215,6 +215,18 @@ function OutfitHeading() {
<EditablePreview />
<EditableInput />
{!isEditing && (
<OutfitNameEditButton onRequestEdit={onRequestEdit} />
)}
</>
)}
</Editable>
</Heading1>
</PseudoBox>
);
}
function OutfitNameEditButton({ onRequestEdit }) {
return (
<PseudoBox
d="inline-block"
opacity="0"
@ -231,12 +243,6 @@ function OutfitHeading() {
title="Edit outfit name"
/>
</PseudoBox>
)}
</>
)}
</Editable>
</Heading1>
</PseudoBox>
);
}