@soul-refiner/design-system 0.2.3 → 0.2.5
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.
|
@@ -7,5 +7,6 @@ export interface CommonProps extends TypographyProps {
|
|
|
7
7
|
export interface ParagraphProps extends CommonProps {
|
|
8
8
|
$fontSize?: 10 | 11 | 12 | 14 | 16;
|
|
9
9
|
$lineHeight?: 14 | 16 | 20 | 24;
|
|
10
|
+
$sx?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const P: ({ as, children, $fontSize, $lineHeight, $textAlign, ...rest }: ParagraphProps) => React.JSX.Element;
|
|
12
|
+
export declare const P: ({ as, children, $fontSize, $lineHeight, $textAlign, sx, ...rest }: ParagraphProps) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Styles } from '../../../common';
|
|
5
|
-
export const P = ({ as = 'p', children, $fontSize = 16, $lineHeight = 24, $textAlign = 'left', ...rest }) => (React.createElement(StyledP, { as: as, "$fontSize": $fontSize, "$lineHeight": $lineHeight, "$textAlign": $textAlign, ...rest }, children));
|
|
5
|
+
export const P = ({ as = 'p', children, $fontSize = 16, $lineHeight = 24, $textAlign = 'left', sx, ...rest }) => (React.createElement(StyledP, { as: as, "$fontSize": $fontSize, "$lineHeight": $lineHeight, "$textAlign": $textAlign, "$sx": sx, ...rest }, children));
|
|
6
6
|
const StyledP = styled.p `
|
|
7
7
|
margin: 0px;
|
|
8
8
|
font-family: Inter;
|
|
@@ -14,4 +14,5 @@ const StyledP = styled.p `
|
|
|
14
14
|
${Styles.typography}
|
|
15
15
|
${Styles.styleable}
|
|
16
16
|
${({ $textClampLines }) => ($textClampLines ? Styles.textClamp : '')}
|
|
17
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
17
18
|
`;
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { Box, H, P } from '../../';
|
|
5
5
|
export const ActionCard = ({ actions, content, href, image, logo, subtitle, sx, title, }) => {
|
|
6
6
|
const isAnchor = !!href;
|
|
7
|
-
return (React.createElement(Wrapper, { as: isAnchor ? 'a' : 'div' },
|
|
7
|
+
return (React.createElement(Wrapper, { as: isAnchor ? 'a' : 'div', href: href },
|
|
8
8
|
React.createElement(Action, { "$backgroundImage": image, "$sx": sx },
|
|
9
9
|
React.createElement("img", { src: image, alt: "" }),
|
|
10
10
|
React.createElement(Figcaption, null,
|
|
@@ -14,7 +14,10 @@ export const ActionCard = ({ actions, content, href, image, logo, subtitle, sx,
|
|
|
14
14
|
React.createElement(P, { as: "span", "$color": "grey-3", "$fontSize": 14, "$lineHeight": 20, "$textAlign": "center", sx: "margin-top: 12px;" }, content),
|
|
15
15
|
React.createElement(Box, { "$display": "flex", "$dir": "row", "$gap": 8, sx: "margin-top: 8px; width: 100%;" }, React.Children.toArray(actions))))));
|
|
16
16
|
};
|
|
17
|
-
const Wrapper = styled.div
|
|
17
|
+
const Wrapper = styled.div `
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
${({ as }) => (as === 'a' ? 'cursor: pointer;' : '')}
|
|
20
|
+
`;
|
|
18
21
|
const Action = styled.figure `
|
|
19
22
|
position: relative;
|
|
20
23
|
aspect-ratio: 310 / 374;
|
|
@@ -32,8 +35,6 @@ const Action = styled.figure `
|
|
|
32
35
|
border-radius: 16px 16px 0px 0px;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
${({ as }) => (as === 'a' ? 'cursor: pointer;' : '')}
|
|
36
|
-
|
|
37
38
|
${({ $sx }) => ($sx ? $sx : '')};
|
|
38
39
|
`;
|
|
39
40
|
const Figcaption = styled.figcaption `
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { Button
|
|
3
|
+
import { Button } from '../../../components/actions/button';
|
|
4
|
+
import { Drawer } from '../../../components/surfaces/drawer';
|
|
4
5
|
import { ChevronDown, ChevronLeft, ChevronUp, Plus } from '../../../icons';
|
|
5
6
|
const INNER_NAV_CHILD_TYPES = [
|
|
6
7
|
'Item',
|