Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@patternfly/react-table
Advanced tools
This library provides a set of React table components for use with the PatternFly 4
This package provides Table PatternFly components based on PatternFly
yarn add @patternfly/react-table
or
npm install @patternfly/react-table --save
It's strongly advised to use the PatternFly base CSS in your whole project, or some components may diverge in appearance:
import '@patternfly/react-core/dist/styles/base.css';
import { Table, Thead, Tr, Th, Td, Tbody } from '@patternfly/react-table';
export const ComposableTableBasic = () => {
const repositories = [
{ name: 'one', branches: 'two', prs: 'three' },
{ name: 'one - 2', branches: null, prs: null },
{ name: 'one - 3', branches: 'two - 3', prs: 'three - 3' }
];
const columnNames = {
name: 'Repositories',
branches: 'Branches',
prs: 'Pull requests'
};
return (
<Table>
<Thead>
<Tr>
<Th>{columnNames.name}</Th>
<Th>{columnNames.branches}</Th>
<Th>{columnNames.prs}</Th>
</Tr>
</Thead>
<Tbody>
{repositories.map(repo => (
<Tr key={repo.name}>
<Td dataLabel={columnNames.name}>{repo.name}</Td>
<Td dataLabel={columnNames.branches}>{repo.branches}</Td>
<Td dataLabel={columnNames.prs}>{repo.prs}</Td>
</Tr>
))}
</Tbody>
</Table>
);
}
export default SimpleTable;
This library makes use of the babel plugin from @patternfly/react-styles to enable providing the CSS alongside the components. This removes the need for consumers to use (style|css|sass)-loaders. For an example of using CSS from core you can reference Button.js. For any CSS not provided by core please use the StyleSheet.create
utility from @patternfly/react-styles. This will prevent collisions with any consumers, and allow the CSS to be bundled with the component.
A comprehensive list of components and detailed usage of each can be found on the PatternFly react docs website You can also find how each component is meant to be used from a design perspective on the PatternFly core website.
Note: All commands below assume you are on the root directory in this repository.
Run to install all the dependencies, build and run the site locally.
yarn install && yarn start
Testing is done at the root of this repo. To only run the @patternfly/react-table tests:
yarn test packages/react-table
FAQs
This library provides a set of React table components for use with the PatternFly 4
The npm package @patternfly/react-table receives a total of 28,572 weekly downloads. As such, @patternfly/react-table popularity was classified as popular.
We found that @patternfly/react-table 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.