
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@increase/admin-components
Advanced tools
Admin components
npm install --save @increase/admin-components
Bootstrapped with create-react-library
//index.js
import React from 'react';
//Include Styles
import "bootstrap/dist/css/bootstrap.min.css";
import "increase-admin-components/src/styles/shards-dashboards.1.1.0.min.css";
// config.js
import {
AttributeField,
TextField,
DateField,
CreateDateField,
BooleanField,
CreateBooleanField
} from 'increase-admin-components';
import { getNames } from './data';
const config = {
list: {
id: { label: 'Id', content: TextField },
name: { label: 'Name', content: TextField },
object: { label: 'Object', content: AttributeField('name') },
date: { label: 'Date', content: DateField },
customDate: {
label: 'Custom Date',
content: CreateDateField('en', {dateStyle: 'full', timeStyle: 'short'})
},
boolean: { label: 'Boolean', content: BooleanField },
customBoolean: { label: 'Custom Boolean', content: CreateBooleanField('Yes', 'Noop') },
},
search: [{
key: 'id',
label: 'Filtrar por id'
}, {
key: 'name',
label: 'Filtrar por nombre',
type: 'select',
content: getNames()
}, {
key: 'active',
label: 'Activo',
type: 'checkbox'
}],
show: {
id: { label: 'Id', content: TextField },
name: { label: 'Name', content: TextField },
object: {
label: 'Object',
type: 'object',
content: {
id: { label: 'Id', content: TextField },
name: { label: 'Nombre', content: TextField }
}
},
nested: {
label: 'Nested',
type: 'nested',
link: false,
content: {
id: { label: 'Id', content: TextField },
name: { label: 'Nombre', content: TextField }
}
},
date: { label: 'Date', content: DateField },
customDate: {
label: 'Custom Date',
content: CreateDateField('en', {dateStyle: 'full', timeStyle: 'short'})
}
}
};
export default config;
// users.js
import { List } from 'increase-admin-components';
import config from './config';
const Users = (props) => {
...
...
return (
<Row>
<Col>
<List
fields={config.list}
data={data}
title="Users"
location={props.location}
searchKeys={config.search}
onPageChange={handlePageChange}
onFilterChange={handleFilterChange}
/>
</Col>
</Row>
);
};
export default withRouter(Users);
// user.js
import React, { useState, useEffect } from 'react';
import { withRouter } from 'react-router';
import { Container, Row, Col } from 'shards-react';
import { Show } from 'increase-admin-components';
import config from './config';
import { getUser } from './data';
const User = (props) => {
const [data, setData] = useState();
const userId = props.match.params.id;
useEffect(() => {
getUser(userId).then(user => setData(user));
}, [userId]);
return (
<Container fluid>
<Row>
<Col>
<Show data={data} title="Show" fields={config.show} match={{}} />
</Col>
</Row>
</Container>
);
};
export default withRouter(User);
MIT © increasecard
FAQs
Admin components
The npm package @increase/admin-components receives a total of 0 weekly downloads. As such, @increase/admin-components popularity was classified as not popular.
We found that @increase/admin-components demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.