Skip to content

Commit

Permalink
Fix issues from layer panel merge. (#6641)
Browse files Browse the repository at this point in the history
  • Loading branch information
miina committed Mar 7, 2021
1 parent 34ac99e commit 5e38555
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -61,10 +61,11 @@ const MediaWrapper = styled.div`
width: 24px;
border-radius: 4px;
overflow: hidden;
margin: 6px;
margin: 5px;
img {
object-fit: cover;
min-height: 24px;
max-height: 100%;
max-width: 100%;
}
`;

Expand Down Expand Up @@ -115,7 +116,7 @@ function PageBackgroundPanel({ selectedElements, pushUpdate }) {
const isMedia = backgroundEl.isBackground && !isDefaultBackground;

const { backgroundColor } = currentPage;
const { LayerContent } = getDefinitionForType(backgroundEl.type);
const { LayerIcon } = getDefinitionForType(backgroundEl.type);

// Background can only have one selected element.
const flip = selectedElements[0]?.flip || DEFAULT_FLIP;
Expand All @@ -142,7 +143,7 @@ function PageBackgroundPanel({ selectedElements, pushUpdate }) {
<Row expand={false}>
<SelectedMedia>
<MediaWrapper>
<LayerContent element={backgroundEl} height={'100%'} />
<LayerIcon element={backgroundEl} />
</MediaWrapper>
<Text size={THEME_CONSTANTS.TYPOGRAPHY.PRESET_SIZES.SMALL}>
{__('Media', 'web-stories')}
Expand Down

0 comments on commit 5e38555

Please sign in to comment.