Skip to content

Commit 4b8c9da

Browse files
committed
debug
1 parent 2223160 commit 4b8c9da

File tree

3 files changed

+72
-111
lines changed

3 files changed

+72
-111
lines changed

demo/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"react-native": "0.74.1",
1111
"react-native-svg": "15.2.0",
1212
"react-native-web": "~0.19.6",
13-
"rn-declarative": "^0.0.38",
13+
"rn-declarative": "^0.0.41",
1414
"rn-declarative-eva": "^0.0.37"
1515
},
1616
"devDependencies": {

demo/pages/MainPage.tsx

Lines changed: 67 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ScrollView } from 'react-native';
66
const fields: TypedField[] = [
77
{
88
type: FieldType.Component,
9+
noBaseline: true,
910
style: {
1011
justifyContent: 'center',
1112
width: '100%',
@@ -672,148 +673,108 @@ const fields: TypedField[] = [
672673
},
673674
element: () => (
674675
<Text category='h6'>
675-
FieldType.Checkbox
676+
FieldType.Radio
676677
</Text>
677678
),
678679
},
679680
{
680-
type: FieldType.Checkbox,
681-
baseline: true,
682-
style: {
683-
width: '100%',
684-
},
685-
name: 'checkbox1',
681+
type: FieldType.Radio,
682+
name: 'radio',
683+
radioValue: '1',
684+
title: 'Radio 1',
686685
},
687686
{
688-
type: FieldType.Checkbox,
689-
style: {
690-
width: '100%',
691-
},
692-
name: 'checkbox2',
687+
type: FieldType.Radio,
688+
name: 'radio',
689+
radioValue: '2',
690+
title: 'Radio 2',
693691
},
694692
{
695-
type: FieldType.Checkbox,
696-
style: {
697-
width: '100%',
698-
},
699-
name: 'checkbox2',
693+
type: FieldType.Radio,
694+
name: 'radio',
695+
radioValue: '3',
696+
title: 'Radio 3',
700697
},
701698
],
702699
},
703-
{
704-
type: FieldType.Component,
705-
style: {
706-
justifyContent: 'center',
707-
width: '100%',
708-
height: 125,
709-
},
710-
element: () => (
711-
<Text category='h4'>
712-
Adaptive form
713-
</Text>
714-
),
715-
},
716700
{
717701
type: FieldType.Group,
718-
style: {
702+
phoneStyle: {
719703
width: '100%',
720704
},
705+
tabletStyle: {
706+
width: '50%',
707+
},
708+
desktopStyle: {
709+
width: '25%',
710+
},
721711
fields: [
722712
{
723-
type: FieldType.Text,
724-
phoneStyle: {
713+
type: FieldType.Component,
714+
style: {
725715
width: '100%',
726716
},
727-
tabletStyle: {
728-
width: '50%',
729-
},
730-
desktopStyle: {
731-
width: '33%',
732-
},
733-
inputMultiline: true,
734-
name: 'text',
735-
title: 'Text',
736-
description: 'Multi line',
717+
element: () => (
718+
<Text category='h6'>
719+
FieldType.Switch
720+
</Text>
721+
),
737722
},
738723
{
739-
type: FieldType.Text,
740-
phoneStyle: {
741-
width: '100%',
742-
},
743-
tabletStyle: {
744-
width: '50%',
745-
},
746-
desktopStyle: {
747-
width: '33%',
748-
},
749-
name: 'text',
750-
title: 'Text',
751-
description: 'Single line',
724+
type: FieldType.Switch,
725+
name: 'switch',
752726
},
753727
{
754-
type: FieldType.Text,
755-
phoneStyle: {
756-
width: '100%',
757-
},
758-
tabletStyle: {
759-
width: '50%',
760-
},
761-
desktopStyle: {
762-
width: '33%',
763-
},
764-
name: 'text',
765-
title: 'Text',
766-
description: 'Single line',
728+
type: FieldType.Switch,
729+
name: 'switch',
767730
},
768731
{
769-
type: FieldType.Text,
770-
phoneStyle: {
771-
width: '100%',
772-
},
773-
tabletStyle: {
774-
width: '50%',
775-
},
776-
desktopStyle: {
777-
width: '33%',
778-
},
779-
name: 'text',
780-
title: 'Text',
781-
description: 'Single line',
732+
type: FieldType.Switch,
733+
name: 'switch',
782734
},
735+
],
736+
},
737+
{
738+
type: FieldType.Group,
739+
phoneStyle: {
740+
width: '100%',
741+
},
742+
tabletStyle: {
743+
width: '50%',
744+
},
745+
desktopStyle: {
746+
width: '25%',
747+
},
748+
fields: [
783749
{
784-
type: FieldType.Text,
785-
phoneStyle: {
750+
type: FieldType.Component,
751+
style: {
786752
width: '100%',
787753
},
788-
tabletStyle: {
789-
width: '50%',
790-
},
791-
desktopStyle: {
792-
width: '33%',
793-
},
794-
name: 'text',
795-
title: 'Text',
796-
description: 'Single line',
754+
element: () => (
755+
<Text category='h6'>
756+
FieldType.Checkbox
757+
</Text>
758+
),
797759
},
798760
{
799-
type: FieldType.Text,
800-
phoneStyle: {
801-
width: '100%',
802-
},
803-
tabletStyle: {
804-
width: '50%',
805-
},
806-
desktopStyle: {
807-
width: '33%',
808-
},
809-
name: 'text',
810-
title: 'Text',
811-
description: 'Single line',
761+
type: FieldType.Checkbox,
762+
baseline: true,
763+
name: 'checkbox1',
764+
},
765+
{
766+
type: FieldType.Checkbox,
767+
name: 'checkbox2',
768+
},
769+
{
770+
type: FieldType.Checkbox,
771+
name: 'checkbox2',
812772
},
813773
],
814774
},
815775
{
816776
type: FieldType.Component,
777+
noBaseline: true,
817778
style: {
818779
justifyContent: 'center',
819780
width: '100%',

0 commit comments

Comments
 (0)