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

docs[QTM-619]: Creates EvaluationForm Component #538

Merged
merged 4 commits into from
Jan 31, 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
5 changes: 4 additions & 1 deletion stories/Introduction/Introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Meta } from '@storybook/addon-docs';

import { Alert } from '../../components';
import { Header } from '../shared'
import EvaluationForm from '../../stories/shared/EvaluationForm'

<Meta title="Introduction/GettingStarted" />

Expand Down Expand Up @@ -39,4 +40,6 @@ yarn add @catho/quantum
import Button from '@catho/quantum/Button';

export default () => <Button>Click here!</Buttom>;
```
```

<EvaluationForm componentName="Introduction" />
1 change: 1 addition & 0 deletions stories/Typography/Components.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable jsx-a11y/control-has-associated-label */
import styled from 'styled-components';

import { Title, Subtitle, Blockquote } from '../../components/GlobalStyle';
Expand Down
38 changes: 38 additions & 0 deletions stories/shared/EvaluationForm/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Unstyled } from '@storybook/addon-docs';
import styled from 'styled-components';
import Accordion from '../../../components/Accordion';

const urlGenerator = (componentName) =>
`https://docs.google.com/forms/d/e/1FAIpQLSewdS_VhSt_JSFOxiuiIc-auEj0MQwn_P_WiXYhAEAE1DqJhg/viewform?entry.1112120969=${componentName}`;

const IFrame = styled.iframe`
width: 100%;
height: 500px;
border: 0;
`;

const EvaluationForm = ({ componentName }) => (
<Unstyled>
<Accordion
items={[
{
content: (
<ul>
<li>
<IFrame
title="Rate our Documentation"
src={`${urlGenerator(componentName)}`}
>
Carregando…
</IFrame>
</li>
</ul>
),
title: 'Rate our Documentation ⭐ ',
},
]}
/>
</Unstyled>
);

export default EvaluationForm;
Loading