Skip to content

Commit

Permalink
Expand the signal side pane (#4676)
Browse files Browse the repository at this point in the history
* modal-small

* SignalSidePane component
  • Loading branch information
akiowebstar authored Dec 8, 2023
1 parent 9fdbfa1 commit 4644cfc
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/ui/src/app/providers/GlobalStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const GlobalStyle = createGlobalStyle`
*, *:before, *:after {
box-sizing: border-box;
word-break: break-word;
}
*::selection, *:before::selection, *:after::selection {
color: ${Colors.Blue[50]};
Expand Down
46 changes: 46 additions & 0 deletions packages/ui/src/common/components/SidePane/SidePane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,52 @@ export const SidePane = styled.div<{ topSize?: 'xs' | 's' | 'm' }>`
}};
`

export const SignalSidePane = styled.div<{ topSize?: 'xs' | 's' | 'm' }>`
display: grid;
grid-template-columns: 1fr;
grid-template-rows: minmax(auto, ${({ topSize }) => (topSize === 's' ? '132px' : '192px')}) 1fr auto;
grid-template-areas:
'sidepaneheader'
'sidepanebody'
'modalfooter';
grid-area: modal;
position: relative;
background-color: ${Colors.White};
width: 100%;
height: 100%;
overflow: hidden;
${Animations.showSidePane};
@media screen and (min-width: 320px) and (max-width: 768px) {
max-width: 100%;
}
@media screen and (min-width: 768px) and (max-width: 1440px) {
max-width: 90%;
}
@media screen and (min-width: 1440px) {
max-width: 1200px;
}
${({ topSize }) => {
switch (topSize) {
case 'xs':
return css`
grid-template-rows: auto 1fr;
${SidePaneHeader} {
padding: 12px 24px;
}
`
case 's':
return css`
${SidePaneHeader} {
align-content: space-between;
}
`
}
}};
`

export const SidePaneGlass = styled.div<{ onClick?: MouseEventHandler<HTMLDivElement> }>`
display: flex;
justify-content: flex-end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import { CloseButton } from '@/common/components/buttons'
import { MarkdownPreview } from '@/common/components/MarkdownPreview'
import {
SidePane,
SignalSidePane,
SidePaneBody,
SidePaneGlass,
SidePaneHeader,
Expand All @@ -29,7 +29,7 @@ export const OpeningDescriptionPreview = ({ onClose, description }: DescriptionP

return (
<SidePaneGlass onClick={onBackgroundClick}>
<SidePane topSize="s">
<SignalSidePane topSize="s">
<SidePaneHeader>
<SidePanelTop>
<SidePaneTitle>Signal Description</SidePaneTitle>
Expand All @@ -41,7 +41,7 @@ export const OpeningDescriptionPreview = ({ onClose, description }: DescriptionP
<MarkdownPreview markdown={description} />
</DescriptionContainer>
</SidePaneBody>
</SidePane>
</SignalSidePane>
</SidePaneGlass>
)
}
Expand Down

2 comments on commit 4644cfc

@vercel
Copy link

@vercel vercel bot commented on 4644cfc Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 4644cfc Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2.vercel.app
pioneer-2-git-dev-joystream.vercel.app
pioneer-2-joystream.vercel.app

Please sign in to comment.