
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@mmb-digital/ui-components-auto
Advanced tools
UI components used in development of MONETA's web applications. See the project vision in the ROADMAP.md file and a more detailed description on [Confluence](https://monetamoneybank.atlassian.net/wiki/spaces/RD/pages/42900394/ui-components).
UI components used in development of MONETA's web applications. See the project vision in the ROADMAP.md file and a more detailed description on Confluence.
Click here to see the components!
Install dependencies:
yarn
Start the development environment:
yarn start
Generate a new component:
yarn run generate
Message propBecause we use react-intl in all of our projects, you can pass a message descriptor to any component for convenience as the message (or messages) prop.
const message = {
id: 'react.intl.example.id',
defaultMessage: 'Hi!'
}
<BButton message={message}>
// alternatively, you may pass a string!
// this is convenient for debugging
<BButton message="Hi!">
// if you can pass more messages to the component,
// use the plural version
<BSelect messages={{ error: message, label: message }}>
Theme propBecause ui-components are supposed to be used primarily with CSS modules, all components feature the theme prop. The theme prop allows you to pass a prioritised CSS module (or an array of CSS modules) or a string, which will be used in addition to all other class names.
A CSS Module is an object, where the keys specify the source class and the values the hashed/minified class.
/* styles.css file in a React app */
.btn {
composes: btn from '<business>';
color: salmon;
}
// part of a component file in a React app
import styles from './styles.css'
// ...
<BButton theme={styles} />
// `btn` would otherwise be applied from `ui-styles`
// instead, it is applied from the theme.
// this is how the `styles` import looks:
// { btn: 'styles__btn___3idho' }
You can also create your own CSS modules of sorts! This is useful if you want to use predefined global class names throughout your application.
const styles = {
btn: 'button',
'btn-primary': 'button-primary',
// ...
}
export default styles
And in your application root:
import React from 'react'
import { BButton, injectTheme, ThemeProvider } from '@prague-digi/ui-components'
import styles from './styles'
const Button = injectTheme(BButton)
// ...
<ThemeProvider theme={styles}>
<Button message="I look pretty!" />
</ThemeProvider>
You can even pass the theme prop to the Button itself! Everything will work just fine. The priority is right-to-left, meaning that if you choose to pass an array of CSS modules, the rightmost one will have priority.
This is the priority list for almost all use cases (from highest to lowest priority). Remember that the resolution is not chained! Once the class name is found in a CSS module, the search STOPS.
theme prop<ThemeProvider />@mmb-digital/ui-styles-auto or a styles.css fileFAQs
UI components used in development of MONETA's web applications. See the project vision in the ROADMAP.md file and a more detailed description on [Confluence](https://monetamoneybank.atlassian.net/wiki/spaces/RD/pages/42900394/ui-components).
We found that @mmb-digital/ui-components-auto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers 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
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.