Skip to content

Commit

Permalink
feat: make widget to use all space (#4197)
Browse files Browse the repository at this point in the history
* feat: make widget wider

* chore: use max width in container

* feat: add padding when drawer is open
  • Loading branch information
anxolin authored Apr 10, 2024
1 parent 1623b37 commit 3ab6cb9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function useWidgetParams(configuratorState: ConfiguratorState): CowSwapWi

const params: CowSwapWidgetParams = {
appCode: 'CoW Widget: Configurator',
width: '450px',
width: '100%',
height: '640px',
chainId,
tokenLists: tokenListUrls.filter((list) => list.enabled).map((list) => list.url),
Expand Down
2 changes: 1 addition & 1 deletion apps/widget-configurator/src/app/configurator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export function Configurator({ title }: { title: string }) {
</List>
</Drawer>

<Box sx={ContentStyled}>
<Box sx={{ ...ContentStyled, pl: isDrawerOpen ? '300px' : 0 }}>
{params && (
<>
<EmbedDialog
Expand Down
1 change: 1 addition & 0 deletions apps/widget-configurator/src/app/configurator/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const DrawerStyled = (theme: Theme) => ({
})

export const ContentStyled = {
width: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
Expand Down
2 changes: 1 addition & 1 deletion libs/widget-react/src/lib/CowSwapWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ export function CowSwapWidget(props: CowSwapWidgetProps) {
)
}

return <div ref={containerRef}></div>
return <div ref={containerRef} style={{ width: '100%' }}></div>
}

0 comments on commit 3ab6cb9

Please sign in to comment.