venice-ui 2.4.4 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/DatePicker/CalendarContent.js +33 -16
- package/dist/cjs/components/Modal/Modal.js +2 -2
- package/dist/cjs/components/Modal/Modal.styles.js +4 -4
- package/dist/cjs/components/Tile/Tile.js +2 -2
- package/dist/cjs/components/Tile/Tile.styles.js +5 -4
- package/dist/esm/components/DatePicker/CalendarContent.js +34 -17
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/esm/components/Modal/Modal.styles.js +4 -4
- package/dist/esm/components/Tile/Tile.js +2 -2
- package/dist/esm/components/Tile/Tile.styles.js +5 -4
- package/dist/types/components/Modal/Modal.d.ts +1 -0
- package/dist/types/components/Modal/Modal.styles.d.ts +1 -0
- package/dist/types/components/Tile/Tile.d.ts +1 -0
- package/dist/types/components/Tile/Tile.styles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -29,9 +29,16 @@ const DatePiocker_styles_1 = require("./DatePiocker.styles");
|
|
|
29
29
|
const date_fns_1 = require("date-fns");
|
|
30
30
|
const Aligment_1 = require("../Aligment");
|
|
31
31
|
const CalendarContent = ({ date, mode, handleChange, changeMode, yearsScope, localeLabels, }) => {
|
|
32
|
+
const [tempYear, setTempYear] = (0, react_1.useState)((0, date_fns_1.getYear)(date));
|
|
33
|
+
const [tempMonth, setTempMonth] = (0, react_1.useState)((0, date_fns_1.getMonth)(date));
|
|
34
|
+
(0, react_1.useEffect)(() => {
|
|
35
|
+
setTempYear((0, date_fns_1.getYear)(date));
|
|
36
|
+
setTempMonth((0, date_fns_1.getMonth)(date));
|
|
37
|
+
}, [date]);
|
|
38
|
+
const viewDate = new Date(tempYear, tempMonth, 1);
|
|
32
39
|
const [days, setDays] = (0, react_1.useState)([]);
|
|
33
|
-
const firstDayOfMonth = (0, date_fns_1.startOfMonth)(
|
|
34
|
-
const daysInMonth = (0, date_fns_1.getDaysInMonth)(
|
|
40
|
+
const firstDayOfMonth = (0, date_fns_1.startOfMonth)(viewDate);
|
|
41
|
+
const daysInMonth = (0, date_fns_1.getDaysInMonth)(viewDate);
|
|
35
42
|
const firstDayIndex = (0, date_fns_1.getDay)(firstDayOfMonth);
|
|
36
43
|
const beforeIndex = firstDayIndex === 0 ? 6 : firstDayIndex - 1;
|
|
37
44
|
(0, react_1.useEffect)(() => {
|
|
@@ -43,36 +50,46 @@ const CalendarContent = ({ date, mode, handleChange, changeMode, yearsScope, loc
|
|
|
43
50
|
daysScope.push(j.toString());
|
|
44
51
|
}
|
|
45
52
|
setDays(daysScope);
|
|
46
|
-
}, [
|
|
53
|
+
}, [viewDate, beforeIndex, daysInMonth]);
|
|
47
54
|
const setDay = (day) => {
|
|
48
55
|
if (!isNaN(day)) {
|
|
49
|
-
const newDate = (
|
|
56
|
+
const newDate = new Date(tempYear, tempMonth, day);
|
|
50
57
|
handleChange(newDate);
|
|
51
58
|
}
|
|
52
59
|
};
|
|
53
60
|
const handleSetMonth = (month) => {
|
|
54
61
|
if (!isNaN(month)) {
|
|
55
|
-
|
|
56
|
-
handleChange(newDate);
|
|
62
|
+
setTempMonth(month);
|
|
57
63
|
changeMode('day');
|
|
58
64
|
}
|
|
59
65
|
};
|
|
60
66
|
const handleSetYear = (year) => {
|
|
61
67
|
if (!isNaN(year)) {
|
|
62
|
-
|
|
63
|
-
handleChange(newDate);
|
|
68
|
+
setTempYear(year);
|
|
64
69
|
changeMode('month');
|
|
65
70
|
}
|
|
66
71
|
};
|
|
72
|
+
const months = localeLabels?.months ?? [
|
|
73
|
+
'January', 'February', 'March', 'April', 'May', 'June',
|
|
74
|
+
'July', 'August', 'September', 'October', 'November', 'December'
|
|
75
|
+
];
|
|
76
|
+
const weekdays = localeLabels?.weekdaysShort ?? ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
67
77
|
return (react_1.default.createElement(DatePiocker_styles_1.CalendarContentWrapper, null,
|
|
68
78
|
mode === 'day' && (react_1.default.createElement(Aligment_1.Aligment, { wrap: "wrap" },
|
|
69
|
-
react_1.default.createElement(DatePiocker_styles_1.DaysHeader, null,
|
|
70
|
-
react_1.default.createElement(DatePiocker_styles_1.DayLabel, null,
|
|
71
|
-
react_1.default.createElement(DatePiocker_styles_1.DaysContent, null, days.map((
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
react_1.default.createElement(DatePiocker_styles_1.DaysHeader, null, weekdays.map((label, idx) => (react_1.default.createElement(DatePiocker_styles_1.DayLabelWrapper, { key: `wd-${idx}` },
|
|
80
|
+
react_1.default.createElement(DatePiocker_styles_1.DayLabel, null, label))))),
|
|
81
|
+
react_1.default.createElement(DatePiocker_styles_1.DaysContent, null, days.map((dayStr, idx) => {
|
|
82
|
+
const dayNum = parseInt(dayStr, 10);
|
|
83
|
+
const isActive = !isNaN(dayNum) &&
|
|
84
|
+
dayNum === (0, date_fns_1.getDate)(date) &&
|
|
85
|
+
tempMonth === (0, date_fns_1.getMonth)(date) &&
|
|
86
|
+
tempYear === (0, date_fns_1.getYear)(date);
|
|
87
|
+
return (react_1.default.createElement(DatePiocker_styles_1.DayWrapper, { key: `d-${idx}` },
|
|
88
|
+
react_1.default.createElement(DatePiocker_styles_1.Day, { active: isActive, haveContent: dayStr !== '', onClick: () => !isNaN(dayNum) && setDay(dayNum) }, dayStr)));
|
|
89
|
+
})))),
|
|
90
|
+
mode === 'month' && (react_1.default.createElement(Aligment_1.Aligment, { wrap: "wrap" }, months.map((_month, index) => (react_1.default.createElement(DatePiocker_styles_1.MonthWrapper, { key: `m-${index}` },
|
|
91
|
+
react_1.default.createElement(DatePiocker_styles_1.Month, { active: index === tempMonth, onClick: () => handleSetMonth(index) }, _month)))))),
|
|
92
|
+
mode === 'year' && (react_1.default.createElement(Aligment_1.Aligment, { wrap: "wrap" }, yearsScope.map((_year) => (react_1.default.createElement(DatePiocker_styles_1.MonthWrapper, { key: `y-${_year}` },
|
|
93
|
+
react_1.default.createElement(DatePiocker_styles_1.Month, { active: _year === tempYear, onClick: () => handleSetYear(_year) }, _year))))))));
|
|
77
94
|
};
|
|
78
95
|
exports.CalendarContent = CalendarContent;
|
|
@@ -31,7 +31,7 @@ const common_1 = require("../common");
|
|
|
31
31
|
const Modal_styles_1 = require("./Modal.styles");
|
|
32
32
|
const styled_components_1 = require("styled-components");
|
|
33
33
|
const ButtonsFooter_1 = require("../ButtonsFooter");
|
|
34
|
-
const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, }) => {
|
|
34
|
+
const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, decorativeEdge = false, }) => {
|
|
35
35
|
(0, react_1.useEffect)(() => {
|
|
36
36
|
const handleKeyDown = (e) => {
|
|
37
37
|
if (e.key === 'Escape') {
|
|
@@ -47,7 +47,7 @@ const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfi
|
|
|
47
47
|
}, [isOpen]);
|
|
48
48
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
49
49
|
react_1.default.createElement(Modal_styles_1.ModalOverlayer, null,
|
|
50
|
-
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size },
|
|
50
|
+
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size, decorativeEdge: decorativeEdge },
|
|
51
51
|
react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
52
52
|
react_1.default.createElement(common_1.ScrollCotainer, null, children),
|
|
53
53
|
react_1.default.createElement(ButtonsFooter_1.ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode, additionDisabled: additionDisabled })))));
|
|
@@ -32,8 +32,8 @@ exports.ModalElement = styled_components_1.default.div `
|
|
|
32
32
|
position: relative;
|
|
33
33
|
max-width: 60rem;
|
|
34
34
|
box-shadow: ${Theme_1.Theme.shadow.m}
|
|
35
|
-
${p => p.size === 'small' && `max-width:500px
|
|
36
|
-
${p => p.size === 'medium' && `max-width:750px
|
|
37
|
-
${p => p.size === 'large' && `max-width:100
|
|
38
|
-
|
|
35
|
+
${p => p.size === 'small' && `max-width:500px;`}
|
|
36
|
+
${p => p.size === 'medium' && `max-width:750px;`}
|
|
37
|
+
${p => p.size === 'large' && `max-width:100%;`}
|
|
38
|
+
${p => p.decorativeEdge && `border-left: 4px solid ${Theme_1.Theme.colors.primary};`}
|
|
39
39
|
`;
|
|
@@ -8,8 +8,8 @@ const ElementHeader_1 = require("../ElementHeader");
|
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const Tile_styles_1 = require("./Tile.styles");
|
|
10
10
|
const Theme_1 = require("../../Theme");
|
|
11
|
-
const Tile = ({ size = 'small', shadow = true, title, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
12
|
-
return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
11
|
+
const Tile = ({ size = 'small', shadow = true, title, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false, decorativeEdge = false, }) => {
|
|
12
|
+
return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height, decorativeEdge: decorativeEdge },
|
|
13
13
|
title && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
14
14
|
children));
|
|
15
15
|
};
|
|
@@ -16,12 +16,13 @@ exports.TileElement = styled_components_1.default.div `
|
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
position: relative;
|
|
19
|
-
height
|
|
19
|
+
height: ${(p) => p.height};
|
|
20
20
|
${(p) => p.shadow &&
|
|
21
21
|
`
|
|
22
22
|
box-shadow: ${Theme_1.Theme.shadow.s}
|
|
23
23
|
`}
|
|
24
|
-
${(p) => p.size === 'small' && `max-width:500px
|
|
25
|
-
${(p) => p.size === 'medium' && `max-width:750px
|
|
26
|
-
${(p) => p.size === 'large' && `max-width:100
|
|
24
|
+
${(p) => p.size === 'small' && `max-width:500px;`}
|
|
25
|
+
${(p) => p.size === 'medium' && `max-width:750px;`}
|
|
26
|
+
${(p) => p.size === 'large' && `max-width:100%;`}
|
|
27
|
+
${(p) => p.decorativeEdge && `border-left: 4px solid ${Theme_1.Theme.colors.primary};`}
|
|
27
28
|
`;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { CalendarContentWrapper, Day, DayLabel, DayLabelWrapper, DaysContent, DaysHeader, DayWrapper, Month, MonthWrapper, } from './DatePiocker.styles';
|
|
3
|
-
import { getDate, getDay, getDaysInMonth, getMonth, getYear,
|
|
3
|
+
import { getDate, getDay, getDaysInMonth, getMonth, getYear, startOfMonth, } from 'date-fns';
|
|
4
4
|
import { Aligment } from '../Aligment';
|
|
5
5
|
export const CalendarContent = ({ date, mode, handleChange, changeMode, yearsScope, localeLabels, }) => {
|
|
6
|
+
const [tempYear, setTempYear] = useState(getYear(date));
|
|
7
|
+
const [tempMonth, setTempMonth] = useState(getMonth(date));
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setTempYear(getYear(date));
|
|
10
|
+
setTempMonth(getMonth(date));
|
|
11
|
+
}, [date]);
|
|
12
|
+
const viewDate = new Date(tempYear, tempMonth, 1);
|
|
6
13
|
const [days, setDays] = useState([]);
|
|
7
|
-
const firstDayOfMonth = startOfMonth(
|
|
8
|
-
const daysInMonth = getDaysInMonth(
|
|
14
|
+
const firstDayOfMonth = startOfMonth(viewDate);
|
|
15
|
+
const daysInMonth = getDaysInMonth(viewDate);
|
|
9
16
|
const firstDayIndex = getDay(firstDayOfMonth);
|
|
10
17
|
const beforeIndex = firstDayIndex === 0 ? 6 : firstDayIndex - 1;
|
|
11
18
|
useEffect(() => {
|
|
@@ -17,35 +24,45 @@ export const CalendarContent = ({ date, mode, handleChange, changeMode, yearsSco
|
|
|
17
24
|
daysScope.push(j.toString());
|
|
18
25
|
}
|
|
19
26
|
setDays(daysScope);
|
|
20
|
-
}, [
|
|
27
|
+
}, [viewDate, beforeIndex, daysInMonth]);
|
|
21
28
|
const setDay = (day) => {
|
|
22
29
|
if (!isNaN(day)) {
|
|
23
|
-
const newDate =
|
|
30
|
+
const newDate = new Date(tempYear, tempMonth, day);
|
|
24
31
|
handleChange(newDate);
|
|
25
32
|
}
|
|
26
33
|
};
|
|
27
34
|
const handleSetMonth = (month) => {
|
|
28
35
|
if (!isNaN(month)) {
|
|
29
|
-
|
|
30
|
-
handleChange(newDate);
|
|
36
|
+
setTempMonth(month);
|
|
31
37
|
changeMode('day');
|
|
32
38
|
}
|
|
33
39
|
};
|
|
34
40
|
const handleSetYear = (year) => {
|
|
35
41
|
if (!isNaN(year)) {
|
|
36
|
-
|
|
37
|
-
handleChange(newDate);
|
|
42
|
+
setTempYear(year);
|
|
38
43
|
changeMode('month');
|
|
39
44
|
}
|
|
40
45
|
};
|
|
46
|
+
const months = localeLabels?.months ?? [
|
|
47
|
+
'January', 'February', 'March', 'April', 'May', 'June',
|
|
48
|
+
'July', 'August', 'September', 'October', 'November', 'December'
|
|
49
|
+
];
|
|
50
|
+
const weekdays = localeLabels?.weekdaysShort ?? ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
41
51
|
return (React.createElement(CalendarContentWrapper, null,
|
|
42
52
|
mode === 'day' && (React.createElement(Aligment, { wrap: "wrap" },
|
|
43
|
-
React.createElement(DaysHeader, null,
|
|
44
|
-
React.createElement(DayLabel, null,
|
|
45
|
-
React.createElement(DaysContent, null, days.map((
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
React.createElement(DaysHeader, null, weekdays.map((label, idx) => (React.createElement(DayLabelWrapper, { key: `wd-${idx}` },
|
|
54
|
+
React.createElement(DayLabel, null, label))))),
|
|
55
|
+
React.createElement(DaysContent, null, days.map((dayStr, idx) => {
|
|
56
|
+
const dayNum = parseInt(dayStr, 10);
|
|
57
|
+
const isActive = !isNaN(dayNum) &&
|
|
58
|
+
dayNum === getDate(date) &&
|
|
59
|
+
tempMonth === getMonth(date) &&
|
|
60
|
+
tempYear === getYear(date);
|
|
61
|
+
return (React.createElement(DayWrapper, { key: `d-${idx}` },
|
|
62
|
+
React.createElement(Day, { active: isActive, haveContent: dayStr !== '', onClick: () => !isNaN(dayNum) && setDay(dayNum) }, dayStr)));
|
|
63
|
+
})))),
|
|
64
|
+
mode === 'month' && (React.createElement(Aligment, { wrap: "wrap" }, months.map((_month, index) => (React.createElement(MonthWrapper, { key: `m-${index}` },
|
|
65
|
+
React.createElement(Month, { active: index === tempMonth, onClick: () => handleSetMonth(index) }, _month)))))),
|
|
66
|
+
mode === 'year' && (React.createElement(Aligment, { wrap: "wrap" }, yearsScope.map((_year) => (React.createElement(MonthWrapper, { key: `y-${_year}` },
|
|
67
|
+
React.createElement(Month, { active: _year === tempYear, onClick: () => handleSetYear(_year) }, _year))))))));
|
|
51
68
|
};
|
|
@@ -5,7 +5,7 @@ import { ScrollCotainer } from '../common';
|
|
|
5
5
|
import { ModalElement, ModalOverlayer } from './Modal.styles';
|
|
6
6
|
import { ThemeProvider } from 'styled-components';
|
|
7
7
|
import { ButtonsFooter } from '../ButtonsFooter';
|
|
8
|
-
export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, }) => {
|
|
8
|
+
export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, decorativeEdge = false, }) => {
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
const handleKeyDown = (e) => {
|
|
11
11
|
if (e.key === 'Escape') {
|
|
@@ -21,7 +21,7 @@ export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfir
|
|
|
21
21
|
}, [isOpen]);
|
|
22
22
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
23
23
|
React.createElement(ModalOverlayer, null,
|
|
24
|
-
React.createElement(ModalElement, { size: size },
|
|
24
|
+
React.createElement(ModalElement, { size: size, decorativeEdge: decorativeEdge },
|
|
25
25
|
React.createElement(ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
26
26
|
React.createElement(ScrollCotainer, null, children),
|
|
27
27
|
React.createElement(ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode, additionDisabled: additionDisabled })))));
|
|
@@ -26,8 +26,8 @@ export const ModalElement = styled.div `
|
|
|
26
26
|
position: relative;
|
|
27
27
|
max-width: 60rem;
|
|
28
28
|
box-shadow: ${Theme.shadow.m}
|
|
29
|
-
${p => p.size === 'small' && `max-width:500px
|
|
30
|
-
${p => p.size === 'medium' && `max-width:750px
|
|
31
|
-
${p => p.size === 'large' && `max-width:100
|
|
32
|
-
|
|
29
|
+
${p => p.size === 'small' && `max-width:500px;`}
|
|
30
|
+
${p => p.size === 'medium' && `max-width:750px;`}
|
|
31
|
+
${p => p.size === 'large' && `max-width:100%;`}
|
|
32
|
+
${p => p.decorativeEdge && `border-left: 4px solid ${Theme.colors.primary};`}
|
|
33
33
|
`;
|
|
@@ -2,8 +2,8 @@ import { ElementHeader } from '../ElementHeader';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TileElement } from './Tile.styles';
|
|
4
4
|
import { mainTheme } from '../../Theme';
|
|
5
|
-
export const Tile = ({ size = 'small', shadow = true, title, children, theme = mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
6
|
-
return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
5
|
+
export const Tile = ({ size = 'small', shadow = true, title, children, theme = mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false, decorativeEdge = false, }) => {
|
|
6
|
+
return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height, decorativeEdge: decorativeEdge },
|
|
7
7
|
title && (React.createElement(ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
8
8
|
children));
|
|
9
9
|
};
|
|
@@ -10,12 +10,13 @@ export const TileElement = styled.div `
|
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
position: relative;
|
|
13
|
-
height
|
|
13
|
+
height: ${(p) => p.height};
|
|
14
14
|
${(p) => p.shadow &&
|
|
15
15
|
`
|
|
16
16
|
box-shadow: ${Theme.shadow.s}
|
|
17
17
|
`}
|
|
18
|
-
${(p) => p.size === 'small' && `max-width:500px
|
|
19
|
-
${(p) => p.size === 'medium' && `max-width:750px
|
|
20
|
-
${(p) => p.size === 'large' && `max-width:100
|
|
18
|
+
${(p) => p.size === 'small' && `max-width:500px;`}
|
|
19
|
+
${(p) => p.size === 'medium' && `max-width:750px;`}
|
|
20
|
+
${(p) => p.size === 'large' && `max-width:100%;`}
|
|
21
|
+
${(p) => p.decorativeEdge && `border-left: 4px solid ${Theme.colors.primary};`}
|
|
21
22
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const ModalOverlayer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
interface IModalElementProp {
|
|
3
3
|
size: string;
|
|
4
|
+
decorativeEdge: boolean;
|
|
4
5
|
theme: any;
|
|
5
6
|
}
|
|
6
7
|
export declare const ModalElement: import("styled-components").StyledComponent<"div", any, IModalElementProp, never>;
|