Skip to content

Commit

Permalink
Merge pull request #28 from firecamp-io/feat/monaco
Browse files Browse the repository at this point in the history
Feat/monaco
  • Loading branch information
Nishchit14 committed Oct 10, 2022
2 parents 9b7c18d + daf9c18 commit 20a62bc
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
},
"dependencies": {
"@firecamp/types": "^0.0.11",
"@radix-ui/react-toast": "^1.0.0",
"@szhsin/react-menu": "^2.3.2",
"autoprefixer": "^10",
"classnames": "^2.3.1",
Expand Down
14 changes: 14 additions & 0 deletions packages/ui-kit/src/components/toast/Toast.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Toast from './Toast';
import { VscMenu } from "@react-icons/all-files/vsc/VscMenu";

export default {
title: "UI-Kit/Toast",
component: Toast,
argTypes: {
}
};

const Template = (args: any) => <Toast {...args} />;

export const ToastComp = Template.bind({});
ToastComp.args = {};
25 changes: 25 additions & 0 deletions packages/ui-kit/src/components/toast/Toast.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as Toast from '@radix-ui/react-toast';
export default () => (
<Toast.Provider label="This is the toast">
<Toast.Root type="foreground">
<Toast.Description>File removed successfully.</Toast.Description>
<Toast.Close>Dismiss</Toast.Close>
</Toast.Root>

<Toast.Root type="foreground" duration={10000}>
<Toast.Description>File removed successfully.</Toast.Description>
<Toast.Action altText="Undo (Alt+U)">
Undo <kbd>Alt</kbd>+<kbd>U</kbd>
</Toast.Action>
<Toast.Close>Dismiss</Toast.Close>
</Toast.Root>

<Toast.Root>
<Toast.Title />
<Toast.Description />
<Toast.Action altText="action" />
<Toast.Close />
</Toast.Root>
<Toast.Viewport />
</Toast.Provider>
);
7 changes: 5 additions & 2 deletions packages/ui-kit/src/ui-kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ export { default as UrlBar } from './components/url/components/UrlBar';
export { default as Popover } from './components/popover/Popover';
export { default as ConfirmationPopover } from './components/popover/ConfirmationPopover';

// Toast
export { default as Toast } from './components/toast/Toast';

// scripts
export { default as ScriptsTabs } from './components/scripts/ScriptsTabs';

//response
// response
export { default as Response } from './components/response/Response';

//----------------------------------------------------enums---------------------------------------------------------------------------
Expand All @@ -114,4 +117,4 @@ export { default as Alert } from './components/alert/Alert';
export type { EAlertType } from './components/alert/Alert.interface';
export { default as Empty } from './components/empty/Empty';

export {default as Loader} from './components/loader/Loader';
export { default as Loader } from './components/loader/Loader';
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ exports.output = {
globalObject: 'this',
filename: '[name].bundle.js',
chunkFilename: '[name].bundle.js',
publicPath: '/js',
};

exports.output.path = path.join(__dirname, `./build/${env}/js`);
Expand Down

0 comments on commit 20a62bc

Please sign in to comment.