diff --git a/docs-site/public/index.html b/docs-site/public/index.html index ab937321d..1055c50b1 100644 --- a/docs-site/public/index.html +++ b/docs-site/public/index.html @@ -7,7 +7,7 @@ - React.js Datepicker crafted by HackerOne + React Datepicker crafted by HackerOne diff --git a/docs-site/src/components/App/index.js b/docs-site/src/components/App/index.js index e1bb05169..c780ad207 100644 --- a/docs-site/src/components/App/index.js +++ b/docs-site/src/components/App/index.js @@ -10,7 +10,7 @@ const Root = () => {
-

ReactJS Datepicker

+

React Datepicker

Crafted by{" "} @@ -25,7 +25,7 @@ const Root = () => {
setStartDate(date)} /> @@ -33,7 +33,7 @@ const Root = () => {
-

ReactJS Datepicker

+

React Datepicker

{

yarn add react-datepicker

+

+ Below are examples which also can be edited directly via the editor on + the left side and will be rendered on the right. +

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}

+              edit icon
               
             
-
+
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; } }