View gist:5517c603ab2d6ade51313537644f9a06
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
/** | |
* Get a browser cookie | |
* | |
* @param string cname = The cookie name | |
* @return string = The cookie value or an empty string ("") if the cookie doesn't exist | |
*/ | |
getCookie = function(cname) { | |
var name = cname + "="; | |
var decodedCookie = decodeURIComponent(document.cookie); | |
var ca = decodedCookie.split(";"); |
View rn-react-component-styling.css
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
.w100 { | |
width: 100%; | |
background-color: "white"; | |
flex: 1; | |
} |
View rn-react-native-component-styling.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
import { StyleSheet } from 'react-native'; | |
export default StyleSheet.create({ | |
w100: { | |
width: '100%', | |
backgroundColor: 'white', | |
flex: 1, | |
}, | |
}); |
View rn-react-native-component.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
import React from 'react'; | |
import { View, Text, Image } from 'react-native'; | |
import PropTypes from 'prop-types'; | |
import styles from './styles'; | |
class ExampleRNComponent extends React.Component { | |
render() { | |
return ( | |
<View style={styles.w100}> | |
<View style={styles.menuTitleWrap}> |
View rn-react-component.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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
class ExampleWebComponent extends React.Component { | |
render() { | |
return ( | |
<div className="w100"> | |
<div className="menuTitleWrap"> | |
<img src={this.props.url} className="shadowImage" alt="" /> | |
</div> |
View categories-list-component.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
import React from "react"; | |
import CategoryCard from "./CategoryCard"; | |
const CategoriesList = props => ( | |
<div> | |
{props.categories.map(element => ( | |
<CategoryCard | |
key={element.id} | |
categId={element.id} | |
src={element.image.src} |
NewerOlder