Skip to content

Commit

Permalink
[Unités] Corrige styles et bannière dans le formulaire d'édition de c…
Browse files Browse the repository at this point in the history
…ontact (#1385)

## Related Pull Requests & Issues

- #1271

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
ivangabriele committed May 22, 2024
2 parents c5918ed + aad88be commit f92ec79
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:unit:watch": "npm run test:unit -- --watch"
},
"dependencies": {
"@mtes-mct/monitor-ui": "17.0.0",
"@mtes-mct/monitor-ui": "17.2.2",
"@reduxjs/toolkit": "1.9.7",
"@rsuite/responsive-nav": "5.0.1",
"@sentry/browser": "7.73.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const Wrapper = styled.div`
color: ${p => p.theme.color.slateGray};
display: flex;
margin-top: 8px;
padding: 8px 16px;
> p:not(:first-child) {
margin: 8px 0 0;
Expand All @@ -55,6 +54,7 @@ const Wrapper = styled.div`

const Left = styled.div`
flex-grow: 1;
padding: 8px 16px 12px;
> p {
align-items: center;
Expand All @@ -68,7 +68,9 @@ const Left = styled.div`
}
`

const Right = styled.div``
const Right = styled.div`
padding: 0 1px;
`

const Name = styled.span`
color: ${p => p.theme.color.gunMetal};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function ControlUnitContactList({ controlUnit, onSubmit }: ControlUnitCon
addMainWindowBanner({
children:
'Cette unité n’a actuellement plus d’adresse de diffusion. Elle ne recevra plus de préavis ni de bilan de ses activités de contrôle.',
closingDelay: 115000,
closingDelay: 15000,
isClosable: true,
isFixed: true,
level: Level.WARNING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import type { Promisable } from 'type-fest'

type ItemProps = {
bannerProps: BannerStackItemProps
bannerStackRank: number
bannerStackId: number
onCloseOrAutoclose: (bannerStackKey: number) => Promisable<void>
}
export function Item({ bannerProps, bannerStackRank, onCloseOrAutoclose }: ItemProps) {
export function Item({ bannerProps, bannerStackId, onCloseOrAutoclose }: ItemProps) {
const controlledBannerProps: BannerProps = {
...bannerProps,
onAutoClose: () => onCloseOrAutoclose(bannerStackRank),
onClose: () => onCloseOrAutoclose(bannerStackRank),
onAutoClose: () => onCloseOrAutoclose(bannerStackId),
onClose: () => onCloseOrAutoclose(bannerStackId),
top: '0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function BannerStack() {
return (
<Wrapper>
{bannerStackItems.map(({ id, props }) => (
<Item key={`banner-${id}`} bannerProps={props} bannerStackRank={id} onCloseOrAutoclose={remove} />
<Item key={`banner-${id}`} bannerProps={props} bannerStackId={id} onCloseOrAutoclose={remove} />
))}
</Wrapper>
)
Expand Down

0 comments on commit f92ec79

Please sign in to comment.