From 633a3f48675ce4cdf439c9e9e957f9aa9414241f Mon Sep 17 00:00:00 2001 From: wmwragg Date: Thu, 21 Jul 2016 17:44:05 +0100 Subject: [PATCH] New component for testing --- src/component-index.js | 1 + src/components/views/elements/Label.js | 39 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/components/views/elements/Label.js diff --git a/src/component-index.js b/src/component-index.js index b3baf22ae..fc4a72c7f 100644 --- a/src/component-index.js +++ b/src/component-index.js @@ -35,6 +35,7 @@ module.exports.components['structures.RoomSubList'] = require('./components/stru module.exports.components['structures.SearchBox'] = require('./components/structures/SearchBox'); module.exports.components['structures.ViewSource'] = require('./components/structures/ViewSource'); module.exports.components['views.elements.ImageView'] = require('./components/views/elements/ImageView'); +module.exports.components['views.elements.Label'] = require('./components/views/elements/Label'); module.exports.components['views.elements.Spinner'] = require('./components/views/elements/Spinner'); module.exports.components['views.globals.GuestWarningBar'] = require('./components/views/globals/GuestWarningBar'); module.exports.components['views.globals.MatrixToolbar'] = require('./components/views/globals/MatrixToolbar'); diff --git a/src/components/views/elements/Label.js b/src/components/views/elements/Label.js new file mode 100644 index 000000000..2bfbebc3f --- /dev/null +++ b/src/components/views/elements/Label.js @@ -0,0 +1,39 @@ +/* +Copyright 2015, 2016 OpenMarket Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +'use strict'; + +var React = require('react'); + +module.exports = React.createClass({ + displayName: 'Label', + + propTypes: { + label: React.PropTypes.string, + }, + + getInitialState: function() { + return({ label : "LABEL" }); + }, + + render: function() { + return ( +
+ { this.props.label } +
+ ); + } +});