Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grommet-cli

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grommet-cli - npm Package Compare versions

Comparing version 0.1.5 to 1.0.0

templates/empty/src/img/mobile-app-icon.svg

2

package.json
{
"name": "grommet-cli",
"version": "0.1.5",
"version": "1.0.0",
"main": "src/grommet.js",

@@ -5,0 +5,0 @@ "description": "Command line interface for Grommet.",

@@ -15,4 +15,3 @@ import path from 'path';

devServerPort: 9000,
eslintOverride: path.resolve(__dirname, 'customEslintrc'),
scsslint: true
eslintOverride: path.resolve(__dirname, 'customEslintrc')
};

@@ -9,3 +9,3 @@ {

"dependencies": {
"grommet": "^0.6.9",
"grommet": "^1.0.0",
"react": "^15.0.2",

@@ -18,5 +18,5 @@ "react-dom": "^15.0.2"

"babel-register": "^6.5.2",
"grommet-toolbox": "^0.2.0",
"grommet-toolbox": "^0.4.5",
"gulp": "^3.9.0"
}
}

@@ -15,4 +15,3 @@ import path from 'path';

devServerPort: 9000,
eslintOverride: path.resolve(__dirname, 'customEslintrc'),
scsslint: true
eslintOverride: path.resolve(__dirname, 'customEslintrc')
};

@@ -9,3 +9,3 @@ {

"dependencies": {
"grommet": "^0.6.9",
"grommet": "^1.0.0",
"react": "^15.0.2",

@@ -18,5 +18,5 @@ "react-dom": "^15.0.2"

"babel-register": "^6.5.2",
"grommet-toolbox": "^0.2.0",
"grommet-toolbox": "^0.4.5",
"gulp": "^3.9.0"
}
}
import React, { Component } from 'react';
import Header from 'grommet/components/Header';
import Tiles from 'grommet/components/Tiles';
import Tile from 'grommet/components/Tile';
import Box from 'grommet/components/Box';
import Heading from 'grommet/components/Heading';
import List from 'grommet/components/List';
import ListItem from 'grommet/components/ListItem';
import Meter from 'grommet/components/Meter';
import Table from 'grommet/components/Table';
import Section from 'grommet/components/Section';
import Value from 'grommet/components/Value';
import Status from 'grommet/components/icons/Status';

@@ -52,33 +53,55 @@

let items = this.state.tasks.map((task, index) => {
let tasks = this.state.tasks.map((task, index) => {
tasksMap[task.status] += 1;
let separator;
if (index === 0) {
separator = 'horizontal';
}
return (
<tr key={index}>
<td><Status value={task.status} small={true} /></td>
<td>{task.item}</td>
</tr>
<ListItem key={`task_${index}`} separator={separator}
responsive={false}>
<Box>
<Status value={task.status} size='small' />
<span>{task.item}</span>
</Box>
</ListItem>
);
});
}, this);
const series = [
getLabel('Past Due', tasksMap.critical, 'critical'),
getLabel('Due Soon', tasksMap.warning, 'warning'),
getLabel('Done', tasksMap.ok, 'ok')
];
let value, label;
if (this.state.index >= 0) {
value = series[this.state.index].value;
label = series[this.state.index].label;
} else {
value = 0;
series.forEach(serie => value += serie.value);
label = 'Total';
}
return (
<Section primary={true}>
<Tiles fill={true} flush={false}>
<Tile align="center">
<Meter series={[
getLabel('Past Due', tasksMap.critical, "critical"),
getLabel('Due Soon', tasksMap.warning, "warning"),
getLabel('Done', tasksMap.ok, "ok")
]} type="circle" units="Tasks" />
</Tile>
<Tile>
<Header><h3>My Tasks:</h3></Header>
<Table>
<tbody>
{items}
</tbody>
</Table>
</Tile>
</Tiles>
<Section primary={true} flex={true}>
<Box direction='row'>
<Box basis='1/3' align="center">
<Meter series={series} type="circle" label={false}
onActive={(index) => this.setState({ index: index })} />
<Box direction="row" justify="between" align="center"
responsive={false}>
<Value value={value} units="Tasks" align="center" label={label} />
</Box>
</Box>
<Box basis='2/3' pad='medium'>
<Heading tag='h3'>My Tasks</Heading>
<List>
{tasks}
</List>
</Box>
</Box>
</Section>

@@ -85,0 +108,0 @@ );

@@ -6,2 +6,3 @@ import '../scss/index.scss';

import App from 'grommet/components/App';
import Anchor from 'grommet/components/Anchor';
import Header from 'grommet/components/Header';

@@ -24,3 +25,3 @@ import Footer from 'grommet/components/Footer';

<p>
Build your ideas with <a href="http://grommet.io" target="_blank">Grommet</a>!
Build your ideas with <Anchor href="http://grommet.io" target="_blank">Grommet</Anchor>!
</p>

@@ -27,0 +28,0 @@ </Footer>

@@ -9,3 +9,3 @@ {

"dependencies": {
"grommet": "^0.6.9",
"grommet": "^1.0.0",
"history": "^2.1.2",

@@ -22,3 +22,3 @@ "react": "^15.0.2",

"ejs-compiled-loader": "^2.1.1",
"grommet-toolbox": "^0.2.0",
"grommet-toolbox": "^0.4.5",
"gulp": "^3.9.0",

@@ -25,0 +25,0 @@ "react-router-to-array": "^0.1.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc