Skip to content

Commit 6d1c245

Browse files
Merge pull request #2 from react-declarative/more-slots
slots
2 parents e4efa7b + 6a6ecad commit 6d1c245

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1224
-8
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.52",
13+
"rn-declarative": "^0.0.53",
1414
"rn-declarative-eva": "^0.0.41"
1515
},
1616
"devDependencies": {

packages/rn-declarative/package-lock.json

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

packages/rn-declarative/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rn-declarative",
3-
"version": "0.0.52",
3+
"version": "0.0.53",
44
"description": "A responsive layout for the react-native",
55
"private": false,
66
"author": {

packages/rn-declarative/src/components/One/components/SlotFactory/ISlotFactoryContext.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import { ISwitchSlot } from '../../slots/SwitchSlot';
99
import { IYesNoSlot } from '../../slots/YesNoSlot';
1010
import { IButtonSlot } from '../../slots/ButtonSlot';
1111

12+
import { ICompleteSlot } from '../../slots/CompleteSlot';
13+
import { IDateSlot } from '../../slots/DateSlot';
14+
import { IProgressSlot } from '../../slots/ProgressSlot';
15+
import { IRatingSlot } from '../../slots/RatingSlot';
16+
import { ISliderSlot } from '../../slots/SliderSlot';
17+
import { ITimeSlot } from '../../slots/TimeSlot';
18+
1219
/**
1320
* A context object that provides access to various component types used by the slot factory.
1421
* @typedef ISlotFactoryContext
@@ -30,6 +37,12 @@ export interface ISlotFactoryContext {
3037
Radio: ComponentType<IRadioSlot>;
3138
Text: ComponentType<ITextSlot>;
3239
Switch: ComponentType<ISwitchSlot>;
40+
Complete: ComponentType<ICompleteSlot>;
41+
Date: ComponentType<IDateSlot>;
42+
Progress: ComponentType<IProgressSlot>;
43+
Rating: ComponentType<IRatingSlot>;
44+
Slider: ComponentType<ISliderSlot>;
45+
Time: ComponentType<ITimeSlot>;
3346
}
3447

3548
export default ISlotFactoryContext;

packages/rn-declarative/src/components/One/components/SlotFactory/SlotContext.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import Text from './components/Text';
99
import Switch from './components/Switch';
1010
import YesNo from './components/YesNo';
1111

12+
import Complete from './components/Complete';
13+
import Date from './components/Date';
14+
import Progress from './components/Progress';
15+
import Rating from './components/Rating';
16+
import Slider from './components/Slider';
17+
import Time from './components/Time';
18+
1219
import ISlotFactoryContext from './ISlotFactoryContext';
1320

1421
/**
@@ -31,6 +38,12 @@ export const defaultSlots: ISlotFactoryContext = {
3138
Text,
3239
Switch,
3340
YesNo,
41+
Complete,
42+
Date,
43+
Progress,
44+
Rating,
45+
Slider,
46+
Time,
3447
};
3548

3649
export const SlotContext = createContext<ISlotFactoryContext>(defaultSlots);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from "react";
2+
3+
import { Text } from 'react-native';
4+
5+
import { ICompleteSlot } from "../../../slots/CompleteSlot";
6+
7+
export const CompleteField = ({}: ICompleteSlot) => (
8+
<Text>
9+
FieldType.Complete is not provided (see OneSlotFactory)
10+
</Text>
11+
);
12+
13+
14+
export default CompleteField;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from "react";
2+
3+
import { Text } from 'react-native';
4+
5+
import { IDateSlot } from "../../../slots/DateSlot";
6+
7+
export const DateField = ({}: IDateSlot) => (
8+
<Text>
9+
FieldType.Date is not provided (see OneSlotFactory)
10+
</Text>
11+
);
12+
13+
14+
export default DateField;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from "react";
2+
3+
import { Text } from 'react-native';
4+
5+
import { IProgressSlot } from "../../../slots/ProgressSlot";
6+
7+
export const ProgressField = ({}: IProgressSlot) => (
8+
<Text>
9+
FieldType.Progress is not provided (see OneSlotFactory)
10+
</Text>
11+
);
12+
13+
14+
export default ProgressField;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from "react";
2+
3+
import { Text } from 'react-native';
4+
5+
import { IRatingSlot } from "../../../slots/RatingSlot";
6+
7+
export const RatingField = ({}: IRatingSlot) => (
8+
<Text>
9+
FieldType.Rating is not provided (see OneSlotFactory)
10+
</Text>
11+
);
12+
13+
14+
export default RatingField;

0 commit comments

Comments
 (0)