Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@hypothesis/frontend-shared
Advanced tools
Shared components, styles and utilities for Hypothesis projects
@hypothesis/frontend-shared
UI components for Hypothesis front-end applications.
Note: This package currently provides two sets of components:
@hypothesis/frontend-shared/
. These components are styled with SASS and have some external assets.@hypothesis/frontend-shared/lib/next
. These components are styled with tailwindcss
and have no external assets.Legacy components are deprecated and are slated for removal at this package's next major version (v6).
Your project must have preact
and tailwindcss
as dependencies.
$ yarn add preact tailwindcss
$ yarn add @hypothesis/frontend-shared
Note: To use legacy components, your project must also have sass
as a dependency.
Update your project's tailwind configuration:
import tailwindConfig from '@hypothesis/frontend-shared/lib/tailwind.preset.js';
export default {
// Use this package's preset
presets: [tailwindConfig],
content: [
// Be sure to add this project's component source to your
// tailwind content globs
'./node_modules/@hypothesis/frontend-shared/lib/**/*.js',
],
// ...
Full documentation is available in this project's web-based pattern library.
$ make dev
import { Link } from '@hypothesis/frontend-shared/lib/next';
import { Link } from '@hypothesis/frontend-shared';
import { registerIcons } from '@hypothesis/frontend-shared';
import { profile, share, trash } from '@hypothesis/frontend-shared/lib/icons';
registerIcons({ profile, shareAnnotation: share, trash });
export default function MyComponent() {
return (
<div>
<Icon name="profile" />
<Icon name="shareAnnotation" />
</div>
);
}
To add styles for all shared components to your project's SASS:
@use '@hypothesis/frontend-shared/styles';
FAQs
Shared components, styles and utilities for Hypothesis projects
The npm package @hypothesis/frontend-shared receives a total of 379 weekly downloads. As such, @hypothesis/frontend-shared popularity was classified as not popular.
We found that @hypothesis/frontend-shared demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.