@dtdot/lego 2.0.0-35 → 2.0.0-37
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/build/components/FloatingAction/FloatingAction.component.d.ts +7 -0
- package/build/components/FloatingAction/FloatingAction.component.js +11 -0
- package/build/components/MinimalMenu/mobile/_MobileMinimalMenuContainer.component.js +1 -1
- package/build/components/MinimalMenu/mobile/_MobileMinimalMenuItem.component.js +6 -2
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const FloatingActionContainer = styled.div `
|
|
4
|
+
position: sticky;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
background-color: ${(props) => props.theme.colours.background};
|
|
7
|
+
`;
|
|
8
|
+
const FloatingAction = ({ children }) => {
|
|
9
|
+
return React.createElement(FloatingActionContainer, null, children);
|
|
10
|
+
};
|
|
11
|
+
export default FloatingAction;
|
|
@@ -13,7 +13,7 @@ const MobileMinimalMenuOuter = styled.div `
|
|
|
13
13
|
justify-content: space-evenly;
|
|
14
14
|
align-items: center;
|
|
15
15
|
|
|
16
|
-
background-color: ${(props) => props.theme.colours.
|
|
16
|
+
background-color: ${(props) => props.theme.colours.cardBackground};
|
|
17
17
|
`;
|
|
18
18
|
const MobileMinimalMenuContainer = ({ children }) => {
|
|
19
19
|
return React.createElement(MobileMinimalMenuOuter, null, children);
|
|
@@ -19,18 +19,22 @@ const MotionDivContainer = styled(motion.div) `
|
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
22
23
|
|
|
23
24
|
padding-top: 3px;
|
|
24
25
|
`;
|
|
25
26
|
const TextDiv = styled.div `
|
|
26
|
-
font-size:
|
|
27
|
+
font-size: 12px;
|
|
27
28
|
padding-top: 6px;
|
|
28
29
|
`;
|
|
30
|
+
const StyledIcon = styled(FontAwesomeIcon) `
|
|
31
|
+
font-size: 22px;
|
|
32
|
+
`;
|
|
29
33
|
const iconContainerVariants = {
|
|
30
34
|
base: { color: darkTheme.colours.defaultFont },
|
|
31
35
|
active: { color: darkTheme.colours.primary.hover },
|
|
32
36
|
};
|
|
33
37
|
const MobileMinimalMenuItem = ({ icon, label, active, onClick, 'data-testid': dataTestId, }) => (React.createElement(ItemContainer, { onClick: onClick, "data-testid": dataTestId || 'menu-item' }, icon && (React.createElement(MotionDivContainer, { animate: active ? 'active' : 'base', variants: iconContainerVariants, transition: mobileMenuDefaultTransition },
|
|
34
|
-
React.createElement(
|
|
38
|
+
React.createElement(StyledIcon, { icon: icon }),
|
|
35
39
|
React.createElement(TextDiv, null, label)))));
|
|
36
40
|
export default MobileMinimalMenuItem;
|
package/build/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { default as Checklist } from './components/Checklist/Checklist.component
|
|
|
14
14
|
export { default as ControlGroup } from './components/ControlGroup/ControlGroup.component';
|
|
15
15
|
export { default as ControlLine } from './components/ControlLine/ControlLine.component';
|
|
16
16
|
export { default as FancyCheckbox } from './components/FancyCheckbox/FancyCheckbox.component';
|
|
17
|
+
export { default as FloatingAction } from './components/FloatingAction/FloatingAction.component';
|
|
17
18
|
export { default as Form } from './components/Form/Form.component';
|
|
18
19
|
export { default as Notification } from './components/Notification/Notification.component';
|
|
19
20
|
export { default as Notifications } from './components/Notifications/Notifications.component';
|
package/build/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as Checklist } from './components/Checklist/Checklist.component
|
|
|
14
14
|
export { default as ControlGroup } from './components/ControlGroup/ControlGroup.component';
|
|
15
15
|
export { default as ControlLine } from './components/ControlLine/ControlLine.component';
|
|
16
16
|
export { default as FancyCheckbox } from './components/FancyCheckbox/FancyCheckbox.component';
|
|
17
|
+
export { default as FloatingAction } from './components/FloatingAction/FloatingAction.component';
|
|
17
18
|
export { default as Form } from './components/Form/Form.component';
|
|
18
19
|
export { default as Notification } from './components/Notification/Notification.component';
|
|
19
20
|
export { default as Notifications } from './components/Notifications/Notifications.component';
|