
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
material-ui-banner
Advanced tools
A material-ui component that allows you to add a banner underneath the app bar.
Bringing the Material Design banner component to the material-ui library. Spec here: https://material.io/design/components/banners.html
npm install material-ui-banner --save
import { Banner, StaticBanner } from 'material-ui-banner';
<Banner
icon={<div />}
label="Text goes here"
open
/>
<AppBar>
<Toolbar />
</AppBar>
<StaticBanner />
You would then open the banner elsewhere in the app like so:
StaticBanner.show({
icon: <div />,
label: 'This is an example of a static banner with one line of text.',
});
Please refer to src/demo
for examples.
These options are compatible with both <Banner>
and StaticBanner.show()
Name | Type | Description | Default |
---|---|---|---|
open | boolean | (required) Indicates whether or not the banner is displayed | false |
label | string | (required) Text label that appears on the banner | '' |
icon | element | Material icon to be displayed on the left side of the banner | null |
iconProps | object | Additional properties that can be passed to the icon. See https://material-ui.com/api/avatar/ | {} |
showDismissButton | boolean | Whether or not to display the default "Dismiss" button | true |
dismissButtonLabel | string | Text label for the default "Dismiss" button | 'Dismiss' |
dismissButtonProps | object | Additional properties that can be passed to the default "Dismiss" button. See https://material-ui.com/api/button/ | {} |
onClose | function | Callback invoked when clicking the Dismiss button. StaticBanner passes a close handler automatically | null |
buttonLabel | string | If provided, add a second button (or only button, if the dismiss button is hidden) | null |
buttonOnClick | function | Click event handler for the custom second button | null |
buttonComponent | element | The element to be used for the custom second button (passed as component={buttonComponent} in MuiButton) | 'button' |
buttonProps | objct | Additional properties that can be passed to the button. See https://material-ui.com/api/button/ | {} |
paperProps | objct | Additional properties that can be passed to the Paper component. See https://material-ui.com/api/paper/ | {} |
cardProps | objct | Additional properties that can be passed to the Card component. See https://material-ui.com/api/card/. If `appBar` is set to `true`, you can also use this parameter to pass in properties to the `Container` component. See `https://material-ui.com/api/container/` | {} |
appBar | boolean | Set to true if the banner should appear at the very top of the page beneath the AppBar component | false |
Uses the MIT License
[3.0.1] - 2021-09-22
FAQs
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.