
Security News
Research
Destructive npm Packages Disguised as Utilities Enable Remote System Wipe
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
@hurtigruten/shared-components
Advanced tools
Reusable React components for Hurtigruten's design.
Storybook: https://hurtigruten.github.io/b2c.utils.shared-components/
npm install --save @hurtigruten/shared-components
More information on publishing can be found here
In 2021 Hurtigruten split the company in three:
All of which have their own visual identity. This is reflected in the components in this library (colors, font-families etc.)
To make it easy to manage which brand to use we export a required BrandProvider
-component, which allows you to control the brand-theme. This is a ThemeProvider used by styled-components.
Supported brands: export type Brand = 'group' | 'coastal' | 'expedition';
Hurtigruten Group ("group"
) will be used for all components in this library if no other brand is specified.
On mount, the BrandProvider
reads the window.brand
value to determine the current context of the application. This is useful for applications that should support multiple brands, like the B2C booking flow.
BrandProvider
accepts an optional prop (fixedBrand
). This value overrides window.brand
for the whole application.
<div>
<Header1>Header with inherited theme</Header1>
<BrandProvider fixedBrand="coastal">
<Header1>Header with fixed brand (coastal)</Header1>
</BrandProvider>
</div>
It's possible to have nested BrandProvider
-components. When this is the case, the closest parent BrandProvider
will be used. This is useful for applications that want to render a small part of the application with a fixed brand, like the B2B portal.
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.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.