
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
lightbox-appco
Advanced tools
#LightBox-AppCo is a simple styled React component that you can use to add a "popup" menu to your React application.
######Installation
npm install lightbox-appco
######Usage
import LightBox from 'lightbox-appco'
import SomeComponentOrElement from './SomeComponentOrElement'
class MyApp extends React.Component {
constructor(props) {
super(props)
this.state = {
showLightBox: false //set the lightbox to not mount initially
}
this.closeLightBox = this.closeLightBox.bind(this)
this.showLightBox = this.showLightBox.bind(this)
}
//function for closing the lightbox
//this will be passed into the LightBox compoent as the closing funtion
closeLightBox = () => {
this.setState({ showLightBox: false })
}
//function for opening the lightbox
showLightBox = () => {
this.setState({ showLightBox: true })
}
render() {
return (
<SomeComponentOrElement onClick={this.showLightBox}>
{this.state.showLightBox ? (
<LightBox
backgroundDimmer="2"
//The backgroundDimmer prop sets the degree of dimming behind the light box.
//The lowest (lighting dimming) is 1. The highest (darkest dimming) is 99.
//If this property is not specified it defaults to 2.
style={//The style prop takes an object of stype properties. You can
//provide any combination of these or none at all.
//Whatever you do not specify will default to a general
//styke that should work well for most purposes.
//The default values are shown below.
{
zIndex: "10",
margin: "25px auto auto auto",
padding: "25px",
width: "600px",
height: "80%",
backgroundColor: "white",
borderRadius: "5px",
borderColor: "white",
borderStyle: "solid",
borderWidth: "3px",
top: "20",
left: "20"
}
}
close={this.closeLightBox}
//The close property must be specified or you
//will have no way to close the lightbox once it is opened.
>
//must pass in child components or other data. Whatever you put here will be
//in the body of the light box
</LightBox>
) : null }
)
}
}
FAQs
A full featured lightbox component for react
The npm package lightbox-appco receives a total of 0 weekly downloads. As such, lightbox-appco popularity was classified as not popular.
We found that lightbox-appco demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.