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

ui-astra-assets

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ui-astra-assets

1. in this file

  • 1.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Testing locally

  1. in this file

    • npm i install dependencies

    • npm run build or npm run tsc to build your module

  2. in childApp

    • in package.json under dependencies add ui-astra-assets with file:(relativePathToRepo)

      • "ui-astra-assets": "file:../ui-astra-assets",
    • npm i to make sure everything is set up

    • start app npm start

AstraTheme AstraColors

AstraTheme should be used with MuiThemeProvider or when you need specific Material Theme styling

AstraColors can be used for Astra's Branding colors.

Note AstraColor.blue & AstraColor.green are the same as AstraTheme.primary & AstraTheme.secondary

import  *  as  React  from  'react';
import { AstraTheme } from 'ui-astra-assets';
import { MuiThemeProvider } from  '@material-ui/core/styles';
import  App  from  'containers/App';

export  default (props) => {
	return (
		...
			<MuiThemeProvider  theme={AstraTheme}>
				...
					<App  />
				...
			</MuiThemeProvider>
		...
	);
};
import  *  as  React  from  'react';
import { AstraColors, AstraThemes } from 'ui-astra-assets';
import Button from  '@material-ui/core/Button';
import { withStyles } from  '@material-ui/core/styles';

const UglyButton = withStyles(theme => ({
	root: {
		backgroundColor: theme.palette.error.dark,
		color: theme.palette.primary.dark,
	},
}))(Button);

export  default (props) => {
	return (
		// warning very ugly
		<UglyButton
			variant={'contained'}
		>
			Attention!
		</Button>
	);
};
import  *  as  React  from  'react';
import { AstraColors, AstraThemes } from 'ui-astra-assets';
import Button from  '@material-ui/core/Button';

export  default (props) => {
	return (
		// warning very ugly
		<Button
			style={{
				backgroundColor: AstraColors.orange.dark,
				// if you are using AstraTheme to set colors
				// it may be better to use the above example
				color: AstraTheme.palette.primary.light,
			}}
			variant={'contained'}
		>
			Attention!
		</Button>
	);
};

FAQs

Package last updated on 03 Oct 2019

Did you know?

Socket

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.

Install

Related posts

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