Skip to content

Commit fa1cb38

Browse files
committed
fix boxShadow type to array
1 parent 8aa5b40 commit fa1cb38

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

packages/designto-token/support-flags/token-wrap/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BoxShadowManifest } from "@reflect-ui/core";
12
///
23
///
34

@@ -50,7 +51,7 @@ export function tokenize_flagged_wrap(
5051
// crossAxisAlignment: frame.crossAxisAlignment,
5152
// mainAxisAlignment: frame.mainAxisAlignment,
5253
// verticalDirection: VerticalDirection.down,
53-
boxShadow: validated.wrap_root.primaryShadow,
54+
boxShadow: validated.wrap_root.shadows as BoxShadowManifest[],
5455
padding: validated.wrap_root.padding,
5556
// background: _background,
5657
borderRadius: validated.wrap_root.cornerRadius,

packages/designto-token/token-container/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { tokenizeBackground } from "../token-background";
44
import { BoxShape } from "@reflect-ui/core/lib/box-shape";
55
import { keyFromNode } from "../key";
66
import { tokenizeBorder } from "../token-border";
7+
import { BoxShadowManifest } from "@reflect-ui/core";
8+
79
function fromRectangle(rect: nodes.ReflectRectangleNode): core.Container {
810
const container = new core.Container({
911
key: keyFromNode(rect),
1012
width: rect.width,
1113
height: rect.height,
1214
borderRadius: rect.cornerRadius,
13-
boxShadow: rect.primaryShadow,
15+
boxShadow: rect.shadows as BoxShadowManifest[],
1416
border: tokenizeBorder.fromNode(rect),
1517
background: tokenizeBackground.fromFills(rect.fills),
1618
});
@@ -26,7 +28,7 @@ function fromEllipse(ellipse: nodes.ReflectEllipseNode): core.Container {
2628
key: keyFromNode(ellipse),
2729
width: ellipse.width,
2830
height: ellipse.height,
29-
boxShadow: ellipse.primaryShadow,
31+
boxShadow: ellipse.shadows as BoxShadowManifest[],
3032
border: tokenizeBorder.fromNode(ellipse),
3133
borderRadius: { all: Math.max(ellipse.width, ellipse.height) / 2 },
3234
background: tokenizeBackground.fromFills(ellipse.fills),

packages/designto-token/token-layout/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function flex_or_stack_from_frame(
116116
crossAxisAlignment: frame.crossAxisAlignment,
117117
mainAxisAlignment: frame.mainAxisAlignment,
118118
verticalDirection: VerticalDirection.down,
119-
boxShadow: frame.primaryShadow,
119+
boxShadow: frame.shadows as BoxShadowManifest[],
120120
padding: frame.padding,
121121
background: _background,
122122
children: wchildren,
@@ -168,7 +168,7 @@ function flex_or_stack_from_frame(
168168
children: stack_children,
169169
width: frame.width,
170170
height: frame.height,
171-
boxShadow: frame.primaryShadow,
171+
boxShadow: frame.shadows as BoxShadowManifest[],
172172
borderRadius: frame.cornerRadius,
173173
border: _border,
174174
padding: frame.padding,
@@ -418,7 +418,7 @@ function fromGroup(
418418
children: stack_children,
419419
width: group.width,
420420
height: group.height,
421-
boxShadow: group.primaryShadow,
421+
boxShadow: group.shadows as BoxShadowManifest[],
422422
padding: group.padding,
423423
background: undefined, // group does not have fills.
424424
});

0 commit comments

Comments
 (0)