diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..6c75c86 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run format +npm run lint +npm run build +npm run test +git add . \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 918e9ad..0664fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "eslint-plugin-react": "7.34.1", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-storybook": "0.8.0", - "husky": "9.0.11", + "husky": "^9.0.11", "jsdom": "24.0.0", "lodash": "4.17.21", "moment": "^2.30.1", @@ -9144,8 +9144,9 @@ }, "node_modules/husky": { "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, - "license": "MIT", "bin": { "husky": "bin.mjs" }, diff --git a/package.json b/package.json index 580f0a6..4ab5a80 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build-storybook": "storybook build", "ci:format": "npm run format && npm run lint", "ci:format:icons": "npm run format:icons && npm run lint:icons", - "prepare": "npm run snyk-protect", + "prepare": "husky", "snyk-protect": "snyk-protect", "prepublishOnly": "npm ci && npm run build" }, @@ -71,7 +71,7 @@ "eslint-plugin-react": "7.34.1", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-storybook": "0.8.0", - "husky": "9.0.11", + "husky": "^9.0.11", "jsdom": "24.0.0", "lodash": "4.17.21", "moment": "^2.30.1", diff --git a/src/molecules/01_CardGrid/CardGrid.tsx b/src/molecules/01_CardGrid/CardGrid.tsx index 5b90299..baafc9f 100644 --- a/src/molecules/01_CardGrid/CardGrid.tsx +++ b/src/molecules/01_CardGrid/CardGrid.tsx @@ -141,6 +141,7 @@ export interface ICardGrid { id?: string; className?: string; cards?: ICard[]; + onLikeCard?: () => void; theme?: 'light' | 'dark'; } @@ -148,6 +149,7 @@ export const HCardGrid = function ({ id = 'atom__CardGrid', className = '', cards = DEFAULT_CARDS, + onLikeCard = () => {}, theme = 'light', }: ICardGrid) { const gridSx = [ @@ -174,6 +176,7 @@ export const HCardGrid = function ({ {cards.map((card) => (