diff --git a/docs-site/src/components/Example/edit-regular.svg b/docs-site/src/components/Example/edit-regular.svg
new file mode 100644
index 000000000..6f92bb5d0
--- /dev/null
+++ b/docs-site/src/components/Example/edit-regular.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs-site/src/components/Example/index.js b/docs-site/src/components/Example/index.js
index a5cde419d..378826236 100644
--- a/docs-site/src/components/Example/index.js
+++ b/docs-site/src/components/Example/index.js
@@ -11,6 +11,7 @@ import ptBR from "date-fns/locale/pt-BR";
import slugify from "slugify";
import range from "lodash/range";
import prismGitHubTheme from "prism-react-renderer/themes/github";
+import editIcon from "./edit-regular.svg";
export default class CodeExampleComponent extends React.Component {
static propTypes = {
@@ -31,7 +32,7 @@ export default class CodeExampleComponent extends React.Component {
{title}
+
-
+
diff --git a/docs-site/src/components/Examples/examples.scss b/docs-site/src/components/Examples/examples.scss
index 464ece8d3..f77d68313 100644
--- a/docs-site/src/components/Examples/examples.scss
+++ b/docs-site/src/components/Examples/examples.scss
@@ -67,9 +67,10 @@
}
&__code {
+ position: relative;
background-color: #f5f8fb;
- padding: 20px;
- margin: 0 -20px 20px;
+ padding: 5px;
+ margin: 0 -20px;
border-top: 1px solid #d8e4ef;
border-bottom: 1px solid #d8e4ef;
overflow-x: auto;
@@ -82,10 +83,20 @@
margin-bottom: 0;
}
- code {
- background: none;
- border: 0;
+ textarea:focus {
+ outline: 0;
}
+
+ &__edit_icon {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 20px;
+ z-index: 10;
+ }
+ }
+ &__preview {
+ padding: 20px 0;
}
}