@pluralsight/headless-styles
Advanced tools
Comparing version 0.0.0-alpha-f6cedf to 0.0.0-alpha-ffc250
@@ -1,10 +0,5 @@ | ||
import type { ButtonHTMLAttributes, DetailedHTMLProps } from 'react'; | ||
interface ButtonOptions extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> { | ||
kind?: 'text' | 'text-weak' | 'weak' | 'medium' | 'strong'; | ||
size?: 'xs' | 's' | 'm' | 'l'; | ||
} | ||
import type { ButtonOptions, ButtonType } from './types'; | ||
export declare function getButtonProps(options?: ButtonOptions): { | ||
className: string; | ||
type: "button" | "submit" | "reset" | undefined; | ||
type: ButtonType; | ||
}; | ||
export {}; |
@@ -0,10 +1,5 @@ | ||
import { getDefaultOptions } from './shared'; | ||
import styles from './buttonCSS.module.css'; | ||
const defaultButtonOptions = { | ||
kind: 'text', | ||
size: 'm', | ||
}; | ||
export function getButtonProps(options) { | ||
var _a, _b; | ||
const kind = (_a = options === null || options === void 0 ? void 0 : options.kind) !== null && _a !== void 0 ? _a : defaultButtonOptions.kind; | ||
const size = (_b = options === null || options === void 0 ? void 0 : options.size) !== null && _b !== void 0 ? _b : defaultButtonOptions.size; | ||
const { kind, size } = getDefaultOptions(options); | ||
const formattedSize = `size-${size}`; | ||
@@ -11,0 +6,0 @@ return { |
export { getButtonProps } from './components/Button/buttonCSS'; | ||
export { getJSButtonProps } from './components/Button/buttonJS'; |
export { getButtonProps } from './components/Button/buttonCSS'; | ||
export { getJSButtonProps } from './components/Button/buttonJS'; |
{ | ||
"name": "@pluralsight/headless-styles", | ||
"version": "0.0.0-alpha-f6cedf", | ||
"version": "0.0.0-alpha-ffc250", | ||
"description": "Headless styles for Pluralsight.", | ||
@@ -18,2 +18,5 @@ "main": "./build/index.js", | ||
}, | ||
"dependencies": { | ||
"@pluralsight/design-tokens": "alpha" | ||
}, | ||
"devDependencies": { | ||
@@ -20,0 +23,0 @@ "@types/copyfiles": "^2", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13855
13
423
1
1
+ Added@pluralsight/design-tokens@0.0.0-alpha-ebdadf(transitive)