Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rebase] 20240723 #6

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run format
npm run lint
npm run build
npm run test
git add .
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/molecules/01_CardGrid/CardGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,15 @@ export interface ICardGrid {
id?: string;
className?: string;
cards?: ICard[];
onLikeCard?: () => void;
theme?: 'light' | 'dark';
}

export const HCardGrid = function ({
id = 'atom__CardGrid',
className = '',
cards = DEFAULT_CARDS,
onLikeCard = () => {},
theme = 'light',
}: ICardGrid) {
const gridSx = [
Expand All @@ -174,6 +176,7 @@ export const HCardGrid = function ({
{cards.map((card) => (
<Card
key={`molecules__cardgrid__card__element--${card.title}`}
onLike={onLikeCard}
{...card}
theme={theme}
className="col-span-full sm:col-span-6 lg:col-span-4 col-start-0"
Expand Down
Loading