Skip to content

Commit c6126cf

Browse files
authored
Merge pull request #538 from catho/QTM-619
docs[QTM-619]: Creates EvaluationForm Component
2 parents af8c009 + ba63ea1 commit c6126cf

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

stories/Introduction/Introduction.mdx

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Meta } from '@storybook/addon-docs';
22

33
import { Alert } from '../../components';
44
import { Header } from '../shared'
5+
import EvaluationForm from '../../stories/shared/EvaluationForm'
56

67
<Meta title="Introduction/GettingStarted" />
78

@@ -39,4 +40,6 @@ yarn add @catho/quantum
3940
import Button from '@catho/quantum/Button';
4041

4142
export default () => <Button>Click here!</Buttom>;
42-
```
43+
```
44+
45+
<EvaluationForm componentName="Introduction" />

stories/Typography/Components.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable jsx-a11y/control-has-associated-label */
12
import styled from 'styled-components';
23

34
import { Title, Subtitle, Blockquote } from '../../components/GlobalStyle';
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { Unstyled } from '@storybook/addon-docs';
2+
import styled from 'styled-components';
3+
import Accordion from '../../../components/Accordion';
4+
5+
const urlGenerator = (componentName) =>
6+
`https://docs.google.com/forms/d/e/1FAIpQLSewdS_VhSt_JSFOxiuiIc-auEj0MQwn_P_WiXYhAEAE1DqJhg/viewform?entry.1112120969=${componentName}`;
7+
8+
const IFrame = styled.iframe`
9+
width: 100%;
10+
height: 500px;
11+
border: 0;
12+
`;
13+
14+
const EvaluationForm = ({ componentName }) => (
15+
<Unstyled>
16+
<Accordion
17+
items={[
18+
{
19+
content: (
20+
<ul>
21+
<li>
22+
<IFrame
23+
title="Rate our Documentation"
24+
src={`${urlGenerator(componentName)}`}
25+
>
26+
Carregando…
27+
</IFrame>
28+
</li>
29+
</ul>
30+
),
31+
title: 'Rate our Documentation ⭐ ',
32+
},
33+
]}
34+
/>
35+
</Unstyled>
36+
);
37+
38+
export default EvaluationForm;

0 commit comments

Comments
 (0)