Every line of 'react-native-paper npm' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
11 constructor(cfg = {}) { 12 this.waves = []; 13 this.initialOpacity = cfg.initialOpacity || 0.25; 14 this.opacityDecayVelocity = cfg.opacityDecayVelocity || 0.8; 15 this.initTarget(cfg && cfg.nodeType ? cfg : cfg.target && cfg.target.nodeType ? cfg.target : null); 16 this.recenters = cfg.recenters || this.recenters; 17 this.center = cfg.center || this.center; 18 this.round = cfg.round || this.round; 19 }
51 constructor(cfg) { 52 let { initialOpacity = 0.25, opacityDecayVelocity = 0.8, recenters = false, center = false, round = false, target = null } = cfg || {}; 53 54 /** 55 * Gets or sets the initial opacity of the each wave. 56 * 57 * @type {Number} 58 */ 59 this.initialOpacity = initialOpacity; 60 61 /** 62 * Gets or sets how fast (opacity per second) the wave fades out. 63 * 64 * @type {Number} 65 */ 66 this.opacityDecayVelocity = opacityDecayVelocity; 67 68 /** 69 * @type {PaperWave[]} 70 * @private 71 */ 72 this._waves = []; 73 74 this._initTarget(cfg && cfg.nodeType ? cfg : target && target.nodeType ? target : null); 75 76 /** 77 * @type {Boolean} 78 * @private 79 */ 80 this.recenters = recenters || this.recenters; 81 82 /** 83 * @type {Boolean} 84 * @private 85 */ 86 this.center = center || this.center; 87 88 /** 89 * @type {Boolean} 90 * @private 91 */ 92 this.round = round || this.round; 93 94 return this; 95 }
29 componentDidMount() { 30 // set up paperjs on the window 31 this.canvas = document.getElementById('paperCanvas'); 32 paper.setup(this.canvas); 33 }
34 constructor(props) { 35 super(props); 36 37 this.state = { 38 zDepth: 1, 39 }; 40 41 this.handleMouseOver = () => { 42 this.setState({ zDepth: 3 }); 43 }; 44 45 this.handleMouseOut = () => { 46 this.setState({ zDepth: 1 }); 47 }; 48 }
87 public constructor(props: PaperActionButtonsProps) { 88 super(props); 89 90 this.state = { 91 isAdditionalMenuOpen: false, 92 }; 93 }
35 function PaperSheet(props) { 36 const { classes, data } = props 37 38 return ( 39 <div> 40 41 {map(typographyList, data)} 42 43 </div> 44 ) 45 }
6 render() { 7 const children = React.Children.map(this.props.children, (child) => { 8 return React.cloneElement(child, { 9 ...child.props, 10 contentContainerStyle: { 11 ...child.props.contentContainerStyle, 12 backgroundColor: this.props.theme.colors.background 13 }, 14 style: { 15 ...child.props.style, 16 backgroundColor: this.props.theme.colors.background 17 } 18 }) 19 }) 20 return children 21 }
100 function paperComponent (data, component) { 101 var opts = data.options ? data.options() : data[0].options(); 102 103 component.setOptions = function (name, value) { 104 105 if (pointOptions.indexOf(name) === -1) { 106 opts[name] = value; 107 } else { 108 data.forEach(function (d) { 109 d.set(name, value); 110 }); 111 } 112 return component; 113 }; 114 115 component.data = function () { 116 return data; 117 }; 118 119 return component; 120 }
32 constructor(props: Props) { 33 super(props); 34 const { renderer, paper } = this.props; 35 this.mountNode = renderer.reconciler.createContainer(paper); 36 this.canvas = React.createRef(); 37 }