✨(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:
5
.changeset/bright-lizards-hang.md
Normal file
5
.changeset/bright-lizards-hang.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@openfun/cunningham-react": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
introduce large and extra-large new modal sizes
|
||||||
@@ -139,6 +139,22 @@
|
|||||||
&--large {
|
&--large {
|
||||||
width: var(--c--components--modal--width-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) {
|
@include media(md) {
|
||||||
width: calc(100vw - 1rem);
|
width: calc(100vw - 1rem);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ export const Large: Story = {
|
|||||||
size: ModalSize.LARGE,
|
size: ModalSize.LARGE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
export const ExtraLarge: Story = {
|
||||||
|
args: {
|
||||||
|
size: ModalSize.EXTRA_LARGE,
|
||||||
|
},
|
||||||
|
};
|
||||||
export const Full: Story = {
|
export const Full: Story = {
|
||||||
args: {
|
args: {
|
||||||
size: ModalSize.FULL,
|
size: ModalSize.FULL,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export enum ModalSize {
|
|||||||
SMALL = "small",
|
SMALL = "small",
|
||||||
MEDIUM = "medium",
|
MEDIUM = "medium",
|
||||||
LARGE = "large",
|
LARGE = "large",
|
||||||
|
EXTRA_LARGE = "extra-large",
|
||||||
FULL = "full",
|
FULL = "full",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const tokens = (defaults: DefaultTokens) => {
|
|||||||
"content-color": defaults.theme.colors["greyscale-800"],
|
"content-color": defaults.theme.colors["greyscale-800"],
|
||||||
"width-small": "300px",
|
"width-small": "300px",
|
||||||
"width-medium": "600px",
|
"width-medium": "600px",
|
||||||
"width-large": "75%",
|
"width-large": "800px",
|
||||||
|
"width-extra-large": "75%",
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -137,7 +137,8 @@
|
|||||||
--c--components--modal--content-color: var(--c--theme--colors--greyscale-800);
|
--c--components--modal--content-color: var(--c--theme--colors--greyscale-800);
|
||||||
--c--components--modal--width-small: 300px;
|
--c--components--modal--width-small: 300px;
|
||||||
--c--components--modal--width-medium: 600px;
|
--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-weight: var(--c--theme--font--weights--regular);
|
||||||
--c--components--forms-textarea--font-size: var(--c--theme--font--sizes--l);
|
--c--components--forms-textarea--font-size: var(--c--theme--font--sizes--l);
|
||||||
--c--components--forms-textarea--border-radius: 8px;
|
--c--components--forms-textarea--border-radius: 8px;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -164,7 +164,8 @@ $themes: (
|
|||||||
'content-color': #303C4B,
|
'content-color': #303C4B,
|
||||||
'width-small': 300px,
|
'width-small': 300px,
|
||||||
'width-medium': 600px,
|
'width-medium': 600px,
|
||||||
'width-large': 75%
|
'width-large': 800px,
|
||||||
|
'width-extra-large': 75%
|
||||||
),
|
),
|
||||||
'forms-textarea': (
|
'forms-textarea': (
|
||||||
'font-weight': 400,
|
'font-weight': 400,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user