umwd-components 0.1.171 → 0.1.173

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.
@@ -18,7 +18,8 @@ function FeatureSection(_ref) {
18
18
  const {
19
19
  feature,
20
20
  maxWidth,
21
- sx = {}
21
+ sx = {},
22
+ anchor = ""
22
23
  } = data;
23
24
  const theme = material.useTheme();
24
25
  return /*#__PURE__*/React.createElement(material.Container, {
@@ -26,7 +27,8 @@ function FeatureSection(_ref) {
26
27
  sx: {
27
28
  my: 1,
28
29
  ...sx
29
- }
30
+ },
31
+ id: anchor
30
32
  }, /*#__PURE__*/React.createElement(material.Stack, {
31
33
  spacing: 2,
32
34
  direction: "row",
@@ -45,6 +47,7 @@ function FeatureSection(_ref) {
45
47
  }, feature.map(feature => {
46
48
  const Icon = getIcon.default(feature.icon);
47
49
  return /*#__PURE__*/React.createElement(material.Card, {
50
+ id: feature.anchor || "",
48
51
  key: feature.id,
49
52
  sx: {
50
53
  display: "flex",
@@ -100,7 +100,8 @@ function TextImageSection(_ref2) {
100
100
  reverse = false,
101
101
  maxWidth,
102
102
  sx = {},
103
- glass = false
103
+ glass = false,
104
+ anchor = ""
104
105
  } = data;
105
106
 
106
107
  /* TODO Text_content should deal with linebreaks,
@@ -114,7 +115,8 @@ function TextImageSection(_ref2) {
114
115
  sx: {
115
116
  my: 1,
116
117
  ...sx
117
- }
118
+ },
119
+ id: anchor
118
120
  }, title && /*#__PURE__*/React.createElement(material.Typography, {
119
121
  variant: "h1",
120
122
  textAlign: "center",
@@ -16,7 +16,8 @@ function FeatureSection(_ref) {
16
16
  const {
17
17
  feature,
18
18
  maxWidth,
19
- sx = {}
19
+ sx = {},
20
+ anchor = ""
20
21
  } = data;
21
22
  const theme = useTheme();
22
23
  return /*#__PURE__*/React__default.createElement(Container, {
@@ -24,7 +25,8 @@ function FeatureSection(_ref) {
24
25
  sx: {
25
26
  my: 1,
26
27
  ...sx
27
- }
28
+ },
29
+ id: anchor
28
30
  }, /*#__PURE__*/React__default.createElement(Stack, {
29
31
  spacing: 2,
30
32
  direction: "row",
@@ -43,6 +45,7 @@ function FeatureSection(_ref) {
43
45
  }, feature.map(feature => {
44
46
  const Icon = getIcon(feature.icon);
45
47
  return /*#__PURE__*/React__default.createElement(Card, {
48
+ id: feature.anchor || "",
46
49
  key: feature.id,
47
50
  sx: {
48
51
  display: "flex",
@@ -96,7 +96,8 @@ function TextImageSection(_ref2) {
96
96
  reverse = false,
97
97
  maxWidth,
98
98
  sx = {},
99
- glass = false
99
+ glass = false,
100
+ anchor = ""
100
101
  } = data;
101
102
 
102
103
  /* TODO Text_content should deal with linebreaks,
@@ -110,7 +111,8 @@ function TextImageSection(_ref2) {
110
111
  sx: {
111
112
  my: 1,
112
113
  ...sx
113
- }
114
+ },
115
+ id: anchor
114
116
  }, title && /*#__PURE__*/React__default.createElement(Typography, {
115
117
  variant: "h1",
116
118
  textAlign: "center",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.171",
3
+ "version": "0.1.173",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -24,6 +24,7 @@ interface FeatureProps {
24
24
  subHeading: string;
25
25
  text: string;
26
26
  icon: string;
27
+ anchor?: string;
27
28
  }
28
29
 
29
30
  interface FeatureSectionProps {
@@ -34,6 +35,7 @@ interface FeatureSectionProps {
34
35
  feature: FeatureProps[];
35
36
  maxWidth: MaxWidth;
36
37
  sx?: SxProps<Theme>;
38
+ anchor?: string;
37
39
  }
38
40
 
39
41
  export function FeatureSection({
@@ -41,12 +43,12 @@ export function FeatureSection({
41
43
  }: {
42
44
  readonly data: FeatureSectionProps;
43
45
  }) {
44
- const { feature, maxWidth, sx = {} } = data;
46
+ const { feature, maxWidth, sx = {}, anchor = "" } = data;
45
47
 
46
48
  const theme = useTheme();
47
49
 
48
50
  return (
49
- <Container maxWidth={maxWidth || "lg"} sx={{ my: 1, ...sx }}>
51
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1, ...sx }} id={anchor}>
50
52
  <Stack
51
53
  spacing={2}
52
54
  direction={"row"}
@@ -65,8 +67,10 @@ export function FeatureSection({
65
67
  >
66
68
  {feature.map((feature) => {
67
69
  const Icon = getIcon(feature.icon) as React.ElementType | null;
70
+
68
71
  return (
69
72
  <Card
73
+ id={feature.anchor || ""}
70
74
  key={feature.id}
71
75
  sx={{
72
76
  display: "flex",
@@ -122,6 +122,7 @@ interface TextImageSectionProps {
122
122
  minHeight: string;
123
123
  sx?: SxProps<Theme>;
124
124
  glass?: boolean;
125
+ anchor?: string;
125
126
  };
126
127
  }
127
128
 
@@ -134,6 +135,7 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
134
135
  maxWidth,
135
136
  sx = {},
136
137
  glass = false,
138
+ anchor = "",
137
139
  } = data;
138
140
 
139
141
  /* TODO Text_content should deal with linebreaks,
@@ -144,7 +146,11 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
144
146
  const theme = useTheme();
145
147
 
146
148
  return (
147
- <Container maxWidth={maxWidth ? maxWidth : "lg"} sx={{ my: 1, ...sx }}>
149
+ <Container
150
+ maxWidth={maxWidth ? maxWidth : "lg"}
151
+ sx={{ my: 1, ...sx }}
152
+ id={anchor}
153
+ >
148
154
  {title && (
149
155
  <Typography variant="h1" textAlign="center" sx={{ pb: 2 }}>
150
156
  {title}