Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@scaleds/components
Advanced tools
# get dependencies
yarn
# build assets
yarn build
# start development mode
yarn start
Scale uses css-in-js
and particular jss
as it's styling solution.
The default theme can be found under src/theme/defaultTheme.ts
<html>
...
<!-- Include theme helper -->
<script src="/build/theme/theme.iife.js"></script>
<!-- Include components -->
<script type="module" src="/build/scale-components.esm.js"></script>
<script nomodule src="/build/scale-components.js"></script>
<script>
// Applying changes to theme
scale.useTheme({
shape: {
borderRadius: 24
},
components: {
Button: {
button: {
background: 'purple',
}
}
}
})
</script>
<body>
<h3 id="title">Button</h3>
<scale-button>Click!</scale-button>
</body>
<script>
// Getting current theme values
const { colors } = scale.getTheme()
document.getElementById('title').style.color = colors.primary.default
</script>
</html>
Modifying existing theme, preferrably in index.(jsx|tsx)
const { useTheme } = require('@scaleds/components/dist/theme')
useTheme({
shape: {
borderRadius: 24
},
components: {
Button: {
button: {
background: 'purple',
}
}
}
})
Using current theme values
import React from 'react';
import { Button } from '@scaleds/react-wrapper';
const { colors } = require('@scaleds/components/dist/theme').getTheme()
const App: React.FC = () => (
<div className="app">
<h3 style={{ color: colors.primary.default }}>
Button
</h3>
<Button variant="primary">Click!</Button>
</div>
);
Modifying existing theme, preferrably in main.ts
const { useTheme } = require('@scaleds/components/dist/theme')
useTheme({
shape: {
borderRadius: 24
},
components: {
Button: {
button: {
background: 'purple',
}
}
}
})
Using current theme values
app.component.ts
import { Component } from '@angular/core';
const { colors } = require('@scaleds/components/dist/theme').getTheme()
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'boilerplate-angular';
colors = colors
}
app.component.html
<div>
<h3 style="color: {{colors.primary.default}}">Button</h3>
<scale-button>Click!</scale-button>
</div>
Modifying existing theme, preferrably in main.ts
const { useTheme } = require('@scaleds/components/dist/theme.esm.js')
useTheme({
shape: {
borderRadius: 24
},
components: {
Button: {
button: {
background: 'purple',
}
}
}
})
Using current theme values
App.vue
<template>
<div>
<h3 v-bind:style="`color: ${colors.primary.default}`">
Button
</h3>
<scale-button>Click!</scale-button>
</div>
</template>
<script lang="ts">
import Vue from "vue";
const { colors } = require('@scaleds/components/dist/theme.esm.js').getTheme()
export default Vue.extend({
name: "app",
data: () => ({
colors
})
});
</script>
FAQs
Scale Components
We found that @scaleds/components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.