
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@nokkel/components
Advanced tools
A repository for re-usable, React-based components for use across web applications within the Nokkel ecosystem.
To use this component library in your application, you need to set up i18next for internationalization support and react-router-dom for navigation components.
npm install i18next react-i18next
Create an i18n.ts
file in your project:
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { getResources } from '@nokkel/react-components';
const resources = getResources();
i18n.use(initReactI18next).init({
debug: false,
lng: 'en',
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
resources,
});
export default i18n;
Some components use react-router-dom
's Link component for navigation. Install it as a dependency:
npm install react-router-dom
Important: Components that use routing require your application to be wrapped in a Router provider (BrowserRouter, HashRouter, etc.).
Wrap your application with a Router provider. Choose the appropriate router for your use case:
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
function App() {
return <BrowserRouter>{/* Your app content */}</BrowserRouter>;
}
export default App;
To create a component directory, run `npm run create:component --name="INSERT NAME HERE"
To create an icon, run `npm run create:icon --name="INSERT NAME HERE"
Nokkel components are structured like so:
src/
├── components/
│ └── [Component]/
│ ├── [Component].css
│ ├── [Component].stories.tsx
│ ├── [Component].tsx
│ ├── index.ts
│ └── types.ts
├── content/
│ └── [namespace]/
│ ├── index.json
│ └── [provider].json
├── context/
│ ├── [context].tsx
│ └── index.ts
├── hooks/
│ ├── [hook].ts
│ └── index.ts
├── icons/
│ ├── [Icon]
| ├── [Icon].stories.tsx
│ └── index.ts
├── styles/
│ └── global.css
├── sections/
│ └── [Section]/
│ ├── [Section].css
│ ├── [Section].stories.tsx
│ ├── [Section].tsx
│ ├── index.ts
│ └── types.ts
├── utils/
│ ├── [Util].ts
│ └── index.ts
└── index.ts
Component.css
is where the component classes are stored. We use tailwind styles with the @apply for styles.
[data-theme="[brand]"]
selector in order to change that specific class for brands.Component.stories.tsx
is where the story for Storybook is stored.
satisfies Meta<typeof [Component]>
. It's suggested to use the same pattern in Button.stories.tsxComponent.tsx
contains the actual component.
data-testid=[component]
for testing purposes and identification of component.types.ts
contains all the types such as props.
index.ts
exports the component and types. We use this to export the component to the parent folder.[namespace]/index.json
is the translation file for the text content using i18next formatting.[namespace]/[provider].json
is the provider-specific variant translation file that overrides the default translations.FAQs
Nokkel component library for React-based applications
The npm package @nokkel/components receives a total of 183 weekly downloads. As such, @nokkel/components popularity was classified as not popular.
We found that @nokkel/components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.