-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add feedback widget with screenshot and file upload functionality * fix: add preview-api storybook package due to deprecations happening
- Loading branch information
Showing
9 changed files
with
1,184 additions
and
628 deletions.
There are no files selected for viewing
475 changes: 475 additions & 0 deletions
475
dashboard/components/feedback-widget/FeedbackWidget.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Modal, { ModalProps } from './Modal'; | ||
|
||
function ModalWrapper({ | ||
children, | ||
isOpen, | ||
closeModal | ||
}: Pick<ModalProps, 'children' | 'isOpen'> & { closeModal: () => void }) { | ||
return ( | ||
<Modal isOpen={isOpen} closeModal={() => closeModal()}> | ||
{children} | ||
</Modal> | ||
); | ||
} | ||
|
||
const meta: Meta<typeof Modal> = { | ||
title: 'Komiser/Modal', | ||
component: ModalWrapper, | ||
decorators: [ | ||
Story => <div style={{ margin: '3em', height: '200px' }}>{Story()}</div> | ||
], | ||
tags: ['autodocs'], | ||
argTypes: { | ||
isOpen: { | ||
control: 'boolean' | ||
}, | ||
children: { | ||
control: 'string' | ||
} | ||
} | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof Modal>; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
children: 'Lorem Ipsum dolor' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.