New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

smelte

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smelte - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

6

CHANGELOG.md
# Smelte changelog
## 0.0.21
* Fix styles on the data table
* Refactor style function props to accept strings,
eg. `<Button outlinedClasses="bg-transparent border border-solid text-green-500">` means the same as
`<Button outlinedClasses={c => c + " text-green-500">`
## 0.0.20

@@ -4,0 +10,0 @@ * Fix icons absolute position

2

package.json
{
"name": "smelte",
"description": "UI framework for Svelte using Tailwind CSS",
"version": "0.0.20",
"version": "0.0.21",
"scripts": {

@@ -6,0 +6,0 @@ "dev": "sapper dev -p 7777",

@@ -12,8 +12,12 @@ export default function utils(color, defaultDepth = 500) {

export class ClassBuilder {
constructor() {
this.classes = "";
constructor(classes, defaultClasses) {
console.log("classes", classes, typeof classes);
this.defaults =
typeof classes === "function" ? classes(defaultClasses) : classes;
this.classes = this.defaults;
}
flush() {
this.classes = "";
this.classes = this.defaults;

@@ -51,9 +55,15 @@ return this;

add(className, cond = true) {
if (cond && className) {
this.classes += ` ${className} `;
add(className, cond = true, defaultValue) {
if (!cond || !className) return this;
switch (typeof className) {
case "string":
default:
this.classes += ` ${className} `;
return this;
case "function":
this.classes += ` ${className(defaultValue)} `;
return this;
}
return this;
}
}

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