Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@deanacus/upstart

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deanacus/upstart - npm Package Compare versions

Comparing version
0.0.16
to
0.0.17
+133
dist/Audio.js
import React from 'react';
import PropTypes from 'prop-types';
var Audio = function Audio(_ref) {
var shouldAutoplay = _ref.shouldAutoplay,
hideControls = _ref.hideControls,
shouldLoop = _ref.shouldLoop,
className = _ref.className,
src = _ref.src,
children = _ref.children;
var useSrc = src && !children;
return React.createElement("audio", {
autoPlay: shouldAutoplay,
className: className,
controls: !hideControls,
loop: shouldLoop,
src: useSrc && src
}, children, React.createElement("p", null, "Sorry, your browser doesn't support the audio element"));
};
Audio.propTypes = {
/**
* The content of the Audio component. Should be a <source> element or React
* component that ultimately resolves in a <source> element
*/
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
/** A custom className you would like to pass to the Component */
className: PropTypes.string,
/** Whether or not the controls should be hidden */
hideControls: PropTypes.bool,
/** Whether or not the audio should play automatically */
shouldAutoplay: PropTypes.bool,
/** Whether or not the audio file should be looped */
shouldLoop: PropTypes.bool,
/** A path to a single source. Is ignored if children are passed in, as well. */
src: PropTypes.string
};
Audio.defaultProps = {
children: null,
className: null,
hideControls: false,
shouldAutoplay: false,
shouldLoop: false,
src: null
};
Audio.__docgenInfo = {
"description": "",
"methods": [],
"displayName": "Audio",
"props": {
"children": {
"defaultValue": {
"value": "null",
"computed": false
},
"type": {
"name": "union",
"value": [{
"name": "node"
}, {
"name": "arrayOf",
"value": {
"name": "node"
}
}]
},
"required": false,
"description": "The content of the Audio component. Should be a <source> element or React\ncomponent that ultimately resolves in a <source> element"
},
"className": {
"defaultValue": {
"value": "null",
"computed": false
},
"type": {
"name": "string"
},
"required": false,
"description": "A custom className you would like to pass to the Component"
},
"hideControls": {
"defaultValue": {
"value": "false",
"computed": false
},
"type": {
"name": "bool"
},
"required": false,
"description": "Whether or not the controls should be hidden"
},
"shouldAutoplay": {
"defaultValue": {
"value": "false",
"computed": false
},
"type": {
"name": "bool"
},
"required": false,
"description": "Whether or not the audio should play automatically"
},
"shouldLoop": {
"defaultValue": {
"value": "false",
"computed": false
},
"type": {
"name": "bool"
},
"required": false,
"description": "Whether or not the audio file should be looped"
},
"src": {
"defaultValue": {
"value": "null",
"computed": false
},
"type": {
"name": "string"
},
"required": false,
"description": "A path to a single source. Is ignored if children are passed in, as well."
}
}
};
export default Audio;
export { Audio };
+1
-0
import 'react';
import 'prop-types';
export { Audio } from './Audio.js';
import './_rollupPluginBabelHelpers-7f76772b.js';

@@ -4,0 +5,0 @@ import 'styled-components';

+1
-1

@@ -84,3 +84,3 @@ {

"sideEffects": false,
"version": "0.0.16"
"version": "0.0.17"
}