Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@uob-web-and-digital/uob-components
Advanced tools
This is the frontend component library for the University of Birmingham website utilising Styled Components
Before setting up the UoB component library it is required that you setup Prettier to format JS.
Node: ^16.6.2
NPM: ^7.20.3
*Supported version last updated: 09/12/2021
Launch VS Code Quick Open (Cmd+P for Mac, Ctrl+P for Windows) and paste the following command, and press enter.
ext install esbenp.prettier-vscode
Once the extension is installed you can then configure VSCode to automtically format JS upon saving by adding the following to your VSCode settings.json
file:
"editor.defaultFormatter": null, // (Optional) it is possible to set this as "esbenp.prettier-vscode" for everything but not recommended
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
git clone git@github.com:Mixd/uob-components.git
npm install
from the project rootRun npm run storybook
from the project root. This will run a new instance of Storybook JS that can be accessed from localhost:6006
.
Changes made locally are automatically compiled and the browser instance of Storybook will automaticaly refresh, hot-loading changes very quickly where possible.
Components should always be created within the src/components
folder.
Each component should have a name that describes what it is as generically as possible and shouldn't factor in its expected location. A good example of this would be a component called 'accordion', the name is short and describes its function. A not so great name would be news-accordion because it loses semantics when used outside of the news section.
Once a component has a good name you can create a new folder within src/components
that is based on the name. The format of this folder name should always be lowercase, with multiple words being seperated by dashes i.e. content-sidebar-group
.
Within the component folder you must create the following 3 files:
component-folder
|_ {ComponentName}.js
|_ {ComponentName}.stories.js
|_ Styles.js
Files within the folder should be named in PascalCase which means that each word in the name should have a capital first letter i.e. MyCoolComponent.
This file is where the Component Structure is defined.
This file allows developers to pass in mockup content to the component that will render within Storybook. More information is available in the Storybook docs Storybook JS - Defining Stories
this is where component styling is defined using Styled Components. Note: Styled components not only define the CSS styling but actually create the markup for elements within the component.
FAQs
University of Birmingham - Component Library
We found that @uob-web-and-digital/uob-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.