forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hyperlinks to legalese such as Privacy Policy and Terms of Service
- Loading branch information
Showing
11 changed files
with
259 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import React, { Component } from 'react'; | ||
import { Linking, Text } from 'react-native'; | ||
|
||
/** | ||
* Implements a (hyper)link to a URL in the fashion of the HTML anchor element | ||
* and its href attribute. | ||
*/ | ||
export class Link extends Component { | ||
/** | ||
* Initializes a new Link instance. | ||
* | ||
* @param {Object} props - Component properties. | ||
*/ | ||
constructor(props) { | ||
super(props); | ||
|
||
// Bind event handlers so they are only bound once for every instance. | ||
this._onPress = this._onPress.bind(this); | ||
} | ||
|
||
/** | ||
* Implements React's {@link Component#render()}. | ||
* | ||
* @inheritdoc | ||
* @returns {ReactElement} | ||
*/ | ||
render() { | ||
return ( | ||
<Text | ||
onPress = { this._onPress } | ||
style = { this.props.style }> | ||
{ | ||
this.props.children | ||
} | ||
</Text> | ||
); | ||
} | ||
|
||
/** | ||
* Notifies this instance that Linking failed to open the associated URL. | ||
* | ||
* @param {any} reason - The rejection reason. | ||
* @private | ||
* @returns {void} | ||
*/ | ||
_onLinkingOpenURLRejected(reason) { | ||
const onRejected = this.props.onLinkingOpenURLRejected; | ||
|
||
onRejected && onRejected(reason); | ||
} | ||
|
||
/** | ||
* Handles press on this Link. Opens the URL associated with this Link. | ||
* | ||
* @private | ||
* @returns {void} | ||
*/ | ||
_onPress() { | ||
Linking.openURL(this.props.url) | ||
.catch(reason => this._onLinkingOpenURLRejected(reason)); | ||
} | ||
} | ||
|
||
/** | ||
* Link component's property types. | ||
*/ | ||
Link.propTypes = { | ||
/** | ||
* The children to be displayed within this Link. | ||
*/ | ||
children: React.PropTypes.node, | ||
|
||
/** | ||
* Notifies that this Link failed to open the URL associated with it. | ||
*/ | ||
onLinkingOpenURLRejected: React.PropTypes.function, | ||
|
||
/** | ||
* The CSS style to be applied to this Link for the purposes of display. | ||
*/ | ||
style: React.PropTypes.object, | ||
|
||
/** | ||
* The URL to be opened when this Link is clicked/pressed. | ||
*/ | ||
url: React.PropTypes.string | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './Container'; | ||
export * from './Link'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* The application's default properties related to the CSS box model such as | ||
* margins, borders, padding. | ||
*/ | ||
export const BoxModel = { | ||
/** | ||
* The application's default margin when non-zero margin is necessary. | ||
*/ | ||
margin: 10, | ||
|
||
/** | ||
* The application's default padding when non-zero padding is necessary. | ||
*/ | ||
padding: 10 | ||
}; |
27 changes: 21 additions & 6 deletions
27
react/features/base/styles/components/styles/ColorPalette.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
/** | ||
* The application color palette. | ||
* The application's definition of the default color black. | ||
*/ | ||
const BLACK = '#111111'; | ||
|
||
/** | ||
* The application's color palette. | ||
*/ | ||
export const ColorPalette = { | ||
appBackground: '#111111', | ||
/** | ||
* The application's background color. | ||
*/ | ||
appBackground: BLACK, | ||
|
||
/** | ||
* The application's definition of the default color black. Generally, | ||
* expected to be kept in sync with the application's background color for | ||
* the sake of consistency. | ||
*/ | ||
black: BLACK, | ||
blue: '#17A0DB', | ||
buttonUnderlay: '#495258', | ||
jitsiBlue: '#17A0DB', | ||
jitsiDarkGrey: '#555555', | ||
jitsiRed: '#D00000', | ||
jitsiToggled: '#495258' | ||
darkGrey: '#555555', | ||
red: '#D00000', | ||
white: 'white' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './BoxModel'; | ||
export * from './ColorPalette'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.