| 1 |
import { |
| 2 |
ResponsiveProperty, |
| 3 |
DimensionProperty, |
| 4 |
BackgroundProperty, |
| 5 |
BorderProperty, |
| 6 |
TypographyProperty, |
| 7 |
ColorProperty, |
| 8 |
AlignProperty, |
| 9 |
FillProperty, |
| 10 |
BackgroundColor, |
| 11 |
ZIndex, |
| 12 |
BorderTopColor, |
| 13 |
BorderColorProperty, |
| 14 |
StrokeProperty |
| 15 |
} from "."; |
| 16 |
|
| 17 |
export default function (property, attributes) { |
| 18 |
switch (property.type) { |
| 19 |
case 'responsive': |
| 20 |
return new ResponsiveProperty(property, attributes); |
| 21 |
case 'dimension': |
| 22 |
return new DimensionProperty(property, attributes); |
| 23 |
case 'background': |
| 24 |
return new BackgroundProperty(property, attributes); |
| 25 |
case 'border': |
| 26 |
return new BorderProperty(property, attributes); |
| 27 |
case 'typography': |
| 28 |
return new TypographyProperty(property, attributes); |
| 29 |
case 'color': |
| 30 |
return new ColorProperty(property, attributes); |
| 31 |
case 'fill': |
| 32 |
return new FillProperty(property, attributes); |
| 33 |
case 'border-top-color': |
| 34 |
return new BorderTopColor(property, attributes); |
| 35 |
case 'background-color': |
| 36 |
return new BackgroundColor(property, attributes) |
| 37 |
case 'alignment': |
| 38 |
return new AlignProperty(property, attributes); |
| 39 |
case 'z-index': |
| 40 |
return new ZIndex(property, attributes); |
| 41 |
case 'border-color': |
| 42 |
return new BorderColorProperty(property, attributes); |
| 43 |
case 'stroke': |
| 44 |
return new StrokeProperty(property, attributes); |
| 45 |
} |
| 46 |
} |
| 47 |
|