| Index: sky/examples/fn/widgets/style_component.dart
|
| diff --git a/sky/examples/fn/widgets/style_component.dart b/sky/examples/fn/widgets/style_component.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fb18c52e86ea266d8b325c2b050ca6c969125182
|
| --- /dev/null
|
| +++ b/sky/examples/fn/widgets/style_component.dart
|
| @@ -0,0 +1,17 @@
|
| +part of widgets;
|
| +
|
| +abstract class StyleComponent extends Component {
|
| + Node content;
|
| +
|
| + // Subclasses should implement this getter to provide their style information.
|
| + Style get style => null;
|
| +
|
| + StyleComponent({ Object key, this.content }) : super(key: key);
|
| +
|
| + Node render() {
|
| + return new Container(
|
| + style: style,
|
| + children: content == null ? [] : [content]
|
| + );
|
| + }
|
| +}
|
|
|