Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@twreporter/react-components
Advanced tools
[![Tag](https://img.shields.io/github/tag/twreporter/twreporter-react-components.svg)](https://github.com/twreporter/twreporter-react-components/tags) [![NPM version](https://img.shields.io/npm/v/@twreporter/react-components.svg)](https://www.npmjs.com/pa
Need Peer Dependencies:
yarn add react react-dom react-router
Install:
yarn add twreporter-react-components
import { IndexPageComposite } from 'twreporter-react-components'
const { CategorySection, EditorPicks, Header, InforgraphicSection,
LatestSection, LatestTopicSection, NewsLetterSection, PhotographySection,
ReporterIntro, ReviewsSection, SideBar, TopicsSection } = IndexPageComposite.components
import { Header } from 'twreporter-react-components'
const Page = (props) => (
<div>
<Header
isIndex
pageTheme={props.pageTheme}
pathName={props.pathName}
/>
{props.children}
</div>
)
Props:
isIndex
: (boolean) The Component is used on index page or not. (default: false
)pageTheme
: (string) The page theme passed by twreporter-react
. DARK
or BRIGHT
. (default: 'BRIGHT'
)pathName
: (string) The pathname passed by twreporter-react
. With format likes /categories/inforgraphic
, /photography
. (default: ''
)import { Footer } from 'twreporter-react-components'
const Page = (props) => (
<div>
{props.children}
<Footer />
</div>
)
Props:
none
import { TopicsList } from 'twreporter-react-components'
const Page = (props) =>(
<div>
<PageContent>
<TopicsList
currentPage={props.page}
topics={props.data}
isFetching={props.isFetching}
/>
</PageContent>
</div>
)
props:
currentPage
(number): current page
topics
(array): topics data
isFetching
(boolean): is data ready
import { Bookmark } from 'twreporter-react-components'
const Page = (props) =>(
<div>
<Bookmark
bookmarkData={bookmarkData}
handleBookmarkIconOnClick={this.handleBookmarkIconOnClick}
total={total}
/>
</div>
)
props:
bookmarkData
(array): array of objs. The obj should has following keysconst {
thumbnail,
category,
title,
desc,
published_date,
slug,
is_external,
host,
} = _.get(this.props, 'bookmarkData', {})
handleBookmarkIconOnClick
(func): Each bookmark row contains a bookmark icon. OnClick the icon will trigger the functotal
(number): total number of bookmarks of the user.import { Confirmation } from 'twreporter-react-components'
const Page = (props) =>(
<div>
<Confirmation
onCancel={this.onCancel}
onConfirm={this.onConfirm}
content={DIALOG_CONTENT}
confirm={DIALOG_CONFIRM}
cancel={DIALOG_CANCEL}
/>
</div>
)
props:
onCancel
(func): User click on cancel button will trigger onCancelonConfirm
(func): User click on cancel button will trigger onConfirmcontent
(string): Information in dialogconfirm
(string): confirm button textcancel
(string): cancel button textnpm run dev
will build the package into the customer folder, and start watching the .js
files change.
If any .js
file has been changed, gulp
will babel changed files into the customer folder automatically.
cd twreporter-react-components
npm run dev
cd twreporter-react-components
npm run build
cd twreporter-react-components
npm publish
FAQs
[![NPM version](https://img.shields.io/npm/v/@twreporter/react-components.svg)](https://www.npmjs.com/package/@twreporter/react-components)
The npm package @twreporter/react-components receives a total of 423 weekly downloads. As such, @twreporter/react-components popularity was classified as not popular.
We found that @twreporter/react-components 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.