Socket
Socket
Sign inDemoInstall

@khanacademy/wonder-blocks-icon-button

Package Overview
Dependencies
Maintainers
1
Versions
383
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-icon-button - npm Package Compare versions

Comparing version 0.0.0-PR2224-20240523172344 to 0.0.0-PR2225-20240715160419

20

CHANGELOG.md
# @khanacademy/wonder-blocks-icon-button
## 0.0.0-PR2224-20240523172344
## 0.0.0-PR2225-20240715160419
### Minor Changes
- fa952500: Add onMouseDown prop
## 5.3.0
### Minor Changes
- 16e1635a: IconButton: Add option for `large` value for `size` prop (24x24 icon size with target area of 48x48)
## 5.2.2
### Patch Changes
- Updated dependencies [5dfac06e]
- @khanacademy/wonder-blocks-core@0.0.0-PR2224-20240523172344
- @khanacademy/wonder-blocks-clickable@0.0.0-PR2224-20240523172344
- @khanacademy/wonder-blocks-icon@0.0.0-PR2224-20240523172344
- @khanacademy/wonder-blocks-core@6.4.1
- @khanacademy/wonder-blocks-clickable@4.2.2
- @khanacademy/wonder-blocks-icon@4.1.1

@@ -12,0 +24,0 @@ ## 5.2.1

9

dist/components/icon-button.d.ts

@@ -5,3 +5,3 @@ import * as React from "react";

import { Link } from "react-router-dom";
export type IconButtonSize = "xsmall" | "small" | "medium";
export type IconButtonSize = "xsmall" | "small" | "medium" | "large";
export type SharedProps = Partial<Omit<AriaProps, "aria-disabled">> & {

@@ -41,3 +41,4 @@ /**

* Size of the icon button.
* One of `xsmall` (16 icon, 20 target), `small` (24, 32), or `medium (24, 40).
* One of `xsmall` (16 icon, 20 target), `small` (24, 32), `medium` (24, 40),
* or `large` (24, 48).
* Defaults to `medium`.

@@ -101,2 +102,6 @@ */

onClick?: (e: React.SyntheticEvent) => unknown;
/**
* Function to call when the mouse down event is triggered.
*/
onMouseDown?: (e: React.MouseEvent) => void;
};

@@ -103,0 +108,0 @@ /**

@@ -47,2 +47,4 @@ import * as React from 'react';

return "medium";
case "large":
return "medium";
}

@@ -53,3 +55,4 @@ };

small: 32,
medium: 40
medium: 40,
large: 48
})[size];

@@ -56,0 +59,0 @@

@@ -70,2 +70,4 @@ 'use strict';

return "medium";
case "large":
return "medium";
}

@@ -76,3 +78,4 @@ };

small: 32,
medium: 40
medium: 40,
large: 48
})[size];

@@ -79,0 +82,0 @@

{
"name": "@khanacademy/wonder-blocks-icon-button",
"version": "0.0.0-PR2224-20240523172344",
"version": "0.0.0-PR2225-20240715160419",
"design": "v1",

@@ -19,5 +19,5 @@ "publishConfig": {

"@babel/runtime": "^7.18.6",
"@khanacademy/wonder-blocks-clickable": "0.0.0-PR2224-20240523172344",
"@khanacademy/wonder-blocks-core": "0.0.0-PR2224-20240523172344",
"@khanacademy/wonder-blocks-icon": "0.0.0-PR2224-20240523172344",
"@khanacademy/wonder-blocks-clickable": "^4.2.2",
"@khanacademy/wonder-blocks-core": "^6.4.1",
"@khanacademy/wonder-blocks-icon": "^4.1.1",
"@khanacademy/wonder-blocks-theming": "^2.0.2",

@@ -24,0 +24,0 @@ "@khanacademy/wonder-blocks-tokens": "^1.3.0"

@@ -9,2 +9,3 @@ import {iconSizeForButtonSize, targetPixelsForSize} from "./icon-button-util";

${"medium"} | ${"medium"}
${"large"} | ${"medium"}
`(

@@ -24,2 +25,3 @@ "should return $expectedIconSize icon for $buttonSize icon button",

${"medium"} | ${40}
${"large"} | ${48}
`(

@@ -26,0 +28,0 @@ "should return $expectedTargetPixels for $size icon button",

@@ -15,2 +15,4 @@ import {IconSize} from "@khanacademy/wonder-blocks-icon";

return "medium";
case "large":
return "medium";
}

@@ -23,2 +25,2 @@ };

export const targetPixelsForSize = (size: IconButtonSize): number =>
({xsmall: 24, small: 32, medium: 40}[size]);
({xsmall: 24, small: 32, medium: 40, large: 48}[size]);

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