You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 629acd3
Browse filesBrowse the repository at this point in the historyBrowse files
- A little more straightforward to create react-lightning apps
- Fixes issues with multiple instances of react-lightning (eg for storybook)
- Fixes storybook stories logging multiple renderer errors
Note: lightning renderer beta14 seems to have issues with multiple instances of
lightning rendering text with multiple renderers. When using storybook you'll
need to refresh the page each time to fix text rendering for now.
Copy file name to clipboardExpand all lines: apps/react-lightning-example/src/pages/Page60.tsx
+23-26Lines changed: 23 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ export const Question = ({
29
29
fontSize: 48,
30
30
maxLines: 3,
31
31
textAlign: 'center',
32
-
autosize: false,
33
32
h: TEXT_HEIGHT,
34
33
y: TEXT_HEIGHT/2,
35
34
maxWidth: w,
@@ -58,31 +57,29 @@ export const Page60 = () => {
58
57
},[]);
59
58
60
59
return(
61
-
<>
62
-
<Column
63
-
focusable
64
-
style={{
65
-
gap: 20,
66
-
zIndex: 10,
67
-
position: 'absolute',
68
-
top: 0,
69
-
left: 0,
70
-
w: 1920,
71
-
h: 1080,
72
-
justifyContent: 'center',
73
-
alignItems: 'center',
74
-
}}
75
-
>
76
-
<Rowstyle={{gap: 20}}>
77
-
<ButtononPress={addText}>Add text</Button>
78
-
<ButtononPress={reduceW}>Shrink</Button>
79
-
<ButtononPress={increaseW}>Grow</Button>
80
-
</Row>
60
+
<Column
61
+
focusable
62
+
style={{
63
+
gap: 20,
64
+
zIndex: 10,
65
+
position: 'absolute',
66
+
top: 0,
67
+
left: 0,
68
+
w: 1920,
69
+
h: 1080,
70
+
justifyContent: 'center',
71
+
alignItems: 'center',
72
+
}}
73
+
>
74
+
<Rowstyle={{gap: 20}}>
75
+
<ButtononPress={addText}>Add text</Button>
76
+
<ButtononPress={reduceW}>Shrink</Button>
77
+
<ButtononPress={increaseW}>Grow</Button>
78
+
</Row>
81
79
82
-
<Questiontext={text}w={w}/>
83
-
<Questiontext="This is a multi line test. Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
84
-
<Questiontext="This is a truncation test. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam arcu sem, placerat eu egestas eu, rutrum id neque. Integer rhoncus faucibus ante a tempor. Fusce mollis est sit amet nunc fermentum, ut pellentesque nisl ultrices. Duis ac dolor sed odio feugiat venenatis in ut est. Proin tincidunt posuere accumsan. Etiam lobortis ultrices bibendum. Vivamus consectetur nulla quis mollis aliquet. Nam scelerisque justo in nibh ornare, eu dapibus quam pulvinar. In a libero placerat, sagittis ante quis, maximus turpis. Proin neque eros, eleifend vel est hendrerit, pharetra laoreet nibh. Donec sed urna eu mi iaculis sollicitudin eu in ante. Aliquam ultrices blandit sem, eget suscipit ipsum bibendum in. Fusce nec lorem id dui interdum vestibulum."/>
85
-
</Column>
86
-
</>
80
+
<Questiontext={text}w={w}/>
81
+
<Questiontext="This is a multi line test. Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
82
+
<Questiontext="This is a truncation test. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam arcu sem, placerat eu egestas eu, rutrum id neque. Integer rhoncus faucibus ante a tempor. Fusce mollis est sit amet nunc fermentum, ut pellentesque nisl ultrices. Duis ac dolor sed odio feugiat venenatis in ut est. Proin tincidunt posuere accumsan. Etiam lobortis ultrices bibendum. Vivamus consectetur nulla quis mollis aliquet. Nam scelerisque justo in nibh ornare, eu dapibus quam pulvinar. In a libero placerat, sagittis ante quis, maximus turpis. Proin neque eros, eleifend vel est hendrerit, pharetra laoreet nibh. Donec sed urna eu mi iaculis sollicitudin eu in ante. Aliquam ultrices blandit sem, eget suscipit ipsum bibendum in. Fusce nec lorem id dui interdum vestibulum."/>
0 commit comments