(react) introduce large and extra-large new modal sizes

We realized it was missing an in between medium and large existing
modal sizes. The old large now become extra-large.

Closes #313
This commit is contained in:
Nathan Vasse
2024-04-03 15:56:07 +02:00
committed by NathanVss
parent c81c0eaf43
commit c61b2ac43d
9 changed files with 35 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"@openfun/cunningham-react": minor
---
introduce large and extra-large new modal sizes

View File

@@ -139,6 +139,22 @@
&--large {
width: var(--c--components--modal--width-large);
@include media(lg) {
width: calc(100vw - 4rem);
}
@include media(md) {
width: calc(100vw - 2rem);
}
.c__modal__title-icon {
--icon-size: 4rem;
}
}
&--extra-large {
width: var(--c--components--modal--width-extra-large);
@include media(md) {
width: calc(100vw - 1rem);
}

View File

@@ -56,6 +56,11 @@ export const Large: Story = {
size: ModalSize.LARGE,
},
};
export const ExtraLarge: Story = {
args: {
size: ModalSize.EXTRA_LARGE,
},
};
export const Full: Story = {
args: {
size: ModalSize.FULL,

View File

@@ -9,6 +9,7 @@ export enum ModalSize {
SMALL = "small",
MEDIUM = "medium",
LARGE = "large",
EXTRA_LARGE = "extra-large",
FULL = "full",
}

View File

@@ -15,6 +15,7 @@ export const tokens = (defaults: DefaultTokens) => {
"content-color": defaults.theme.colors["greyscale-800"],
"width-small": "300px",
"width-medium": "600px",
"width-large": "75%",
"width-large": "800px",
"width-extra-large": "75%",
};
};

View File

@@ -137,7 +137,8 @@
--c--components--modal--content-color: var(--c--theme--colors--greyscale-800);
--c--components--modal--width-small: 300px;
--c--components--modal--width-medium: 600px;
--c--components--modal--width-large: 75%;
--c--components--modal--width-large: 800px;
--c--components--modal--width-extra-large: 75%;
--c--components--forms-textarea--font-weight: var(--c--theme--font--weights--regular);
--c--components--forms-textarea--font-size: var(--c--theme--font--sizes--l);
--c--components--forms-textarea--border-radius: 8px;

File diff suppressed because one or more lines are too long

View File

@@ -164,7 +164,8 @@ $themes: (
'content-color': #303C4B,
'width-small': 300px,
'width-medium': 600px,
'width-large': 75%
'width-large': 800px,
'width-extra-large': 75%
),
'forms-textarea': (
'font-weight': 400,

File diff suppressed because one or more lines are too long