Skip to content

Commit

Permalink
Merge pull request #457 from Groww-OSS/develop
Browse files Browse the repository at this point in the history
Develop to Main [16th July 2024] [Mint Icon Storybook]
  • Loading branch information
prashant-adhikari-groww authored Jul 16, 2024
2 parents d803aec + 695a249 commit bd8e3b5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/icon-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ node scripts/generateMaterialIcons.js
.
├── mi // minified material svg's react components
├── custom // minified custom svg's react components
├── mint-icons // minified mint-icons svg's react components
└── types.d.ts // exports react component type
├── svgs
│ ├── mi
│ └── custom
│ ├── custom
│ └── mint-icons
├── scripts
│ ├── generateMaterialIcons.js // Script to copy and filter material icons from google's github repo
Expand Down
5 changes: 4 additions & 1 deletion packages/ui-toolkit/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ module.exports = {
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
]
],
typescript: {
reactDocgen: 'none',
}
}
2 changes: 1 addition & 1 deletion packages/ui-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"typescript": "4.5.5"
},
"dependencies": {
"@groww-tech/icon-store": "1.4.1",
"@groww-tech/icon-store": "1.4.6",
"@groww-tech/mint-css": "0.1.2",
"flat-carousel": "0.0.1",
"lodash.debounce": "^4.0.8",
Expand Down
26 changes: 26 additions & 0 deletions packages/ui-toolkit/stories/IconStore.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';

import * as imgIcons from '@groww-tech/icon-store/custom';
import * as materialIcons from '@groww-tech/icon-store/mi';
import * as mintIcons from '@groww-tech/icon-store/mint-icons';

import { copyToClipboard } from '../src/utils/helper';

Expand Down Expand Up @@ -67,3 +68,28 @@ export const AllMaterialIcons = () => {
</div>
);
};


export const AllMintIcons = () => {
return (
<div className="story_icon_all_image_list">
{
Object.keys(mintIcons).map(icon => {
const IconComponent = mintIcons[icon];
const importCode = `import { ${icon} } from '@groww-tech/icon-store/mint-icons';`;

return (
(<div
key={icon}
className="story_icon_all_image_list_item"
onClick={() => { copyToClipboard(importCode); }}
>
<IconComponent size={48}/>
<div className='bodyLarge'>{icon}</div>
</div>)
);
})
}
</div>
);
};

0 comments on commit bd8e3b5

Please sign in to comment.