✨(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 {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum ModalSize {
|
||||
SMALL = "small",
|
||||
MEDIUM = "medium",
|
||||
LARGE = "large",
|
||||
EXTRA_LARGE = "extra-large",
|
||||
FULL = "full",
|
||||
}
|
||||
|
||||
|
||||
@@ -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%",
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
@@ -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
Reference in New Issue
Block a user