2017-05-05 16:25:18 +03:00
|
|
|
/*
|
|
|
|
Copyright 2017 Vector Creations 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.
|
|
|
|
*/
|
|
|
|
|
2017-05-05 16:56:26 +03:00
|
|
|
import React from 'react';
|
2019-12-20 04:19:56 +03:00
|
|
|
import * as sdk from '../../../index';
|
2017-05-05 16:25:18 +03:00
|
|
|
import PropTypes from 'prop-types';
|
2017-05-29 01:28:29 +03:00
|
|
|
import { _t } from '../../../languageHandler';
|
2017-05-05 16:25:18 +03:00
|
|
|
|
|
|
|
const CreateRoomButton = function(props) {
|
|
|
|
const ActionButton = sdk.getComponent('elements.ActionButton');
|
|
|
|
return (
|
2017-06-05 19:28:36 +03:00
|
|
|
<ActionButton action="view_create_room"
|
2017-05-25 15:54:59 +03:00
|
|
|
mouseOverAction={props.callout ? "callout_create_room" : null}
|
2017-10-11 19:56:17 +03:00
|
|
|
label={_t("Create new room")}
|
2019-01-11 04:37:28 +03:00
|
|
|
iconPath={require("../../../../res/img/icons-create-room.svg")}
|
2017-05-05 16:25:18 +03:00
|
|
|
size={props.size}
|
|
|
|
tooltip={props.tooltip}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
CreateRoomButton.propTypes = {
|
|
|
|
size: PropTypes.string,
|
|
|
|
tooltip: PropTypes.bool,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default CreateRoomButton;
|