extract OutfitNameEditButton
This commit is contained in:
parent
09b928865e
commit
255b77d0cf
1 changed files with 22 additions and 16 deletions
|
@ -215,22 +215,7 @@ function OutfitHeading() {
|
||||||
<EditablePreview />
|
<EditablePreview />
|
||||||
<EditableInput />
|
<EditableInput />
|
||||||
{!isEditing && (
|
{!isEditing && (
|
||||||
<PseudoBox
|
<OutfitNameEditButton onRequestEdit={onRequestEdit} />
|
||||||
d="inline-block"
|
|
||||||
opacity="0"
|
|
||||||
transition="opacity 0.5s"
|
|
||||||
_groupHover={{ opacity: "1" }}
|
|
||||||
onClick={onRequestEdit}
|
|
||||||
position="absolute"
|
|
||||||
>
|
|
||||||
<IconButton
|
|
||||||
icon="edit"
|
|
||||||
variant="link"
|
|
||||||
color="green.600"
|
|
||||||
aria-label="Edit outfit name"
|
|
||||||
title="Edit outfit name"
|
|
||||||
/>
|
|
||||||
</PseudoBox>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -240,6 +225,27 @@ function OutfitHeading() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function OutfitNameEditButton({ onRequestEdit }) {
|
||||||
|
return (
|
||||||
|
<PseudoBox
|
||||||
|
d="inline-block"
|
||||||
|
opacity="0"
|
||||||
|
transition="opacity 0.5s"
|
||||||
|
_groupHover={{ opacity: "1" }}
|
||||||
|
onClick={onRequestEdit}
|
||||||
|
position="absolute"
|
||||||
|
>
|
||||||
|
<IconButton
|
||||||
|
icon="edit"
|
||||||
|
variant="link"
|
||||||
|
color="green.600"
|
||||||
|
aria-label="Edit outfit name"
|
||||||
|
title="Edit outfit name"
|
||||||
|
/>
|
||||||
|
</PseudoBox>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function Heading1({ children, ...props }) {
|
function Heading1({ children, ...props }) {
|
||||||
return (
|
return (
|
||||||
<Heading fontFamily="Delicious" fontWeight="800" size="2xl" {...props}>
|
<Heading fontFamily="Delicious" fontWeight="800" size="2xl" {...props}>
|
||||||
|
|
Loading…
Reference in a new issue