From e5df5ae56c28f694ee419290db8140405b4a120d Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Sat, 23 Nov 2019 14:52:09 +0700 Subject: [PATCH] Add Toggle password visibility --- client/App.jsx | 1 + client/Home.jsx | 1 + client/layouts/Footer.jsx | 2 +- .../toggle-password-visibility/Cover.jsx | 23 ++++++ .../toggle-password-visibility/Details.jsx | 78 +++++++++++++++++++ sitemap.xml | 1 + 6 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 client/patterns/toggle-password-visibility/Cover.jsx create mode 100644 client/patterns/toggle-password-visibility/Details.jsx diff --git a/client/App.jsx b/client/App.jsx index 5b1ab52..ac33b71 100644 --- a/client/App.jsx +++ b/client/App.jsx @@ -42,6 +42,7 @@ const App = () => { + diff --git a/client/Home.jsx b/client/Home.jsx index dcd0293..d711204 100644 --- a/client/Home.jsx +++ b/client/Home.jsx @@ -83,6 +83,7 @@ const Home = () => { + diff --git a/client/layouts/Footer.jsx b/client/layouts/Footer.jsx index f298009..f9eabc0 100644 --- a/client/layouts/Footer.jsx +++ b/client/layouts/Footer.jsx @@ -53,7 +53,7 @@ const Footer = () => {
  • - + { + return ( +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + ); +}; + +export default Cover; diff --git a/client/patterns/toggle-password-visibility/Details.jsx b/client/patterns/toggle-password-visibility/Details.jsx new file mode 100644 index 0000000..edec9e8 --- /dev/null +++ b/client/patterns/toggle-password-visibility/Details.jsx @@ -0,0 +1,78 @@ +import React, { useState } from 'react'; + +import DetailsLayout from '../../layouts/DetailsLayout'; +import BrowserFrame from '../../placeholders/BrowserFrame'; +import SampleCode from '../../SampleCode'; + +const Details = () => { + const [visible, setVisible] = useState(false); + const toggle = () => setVisible(v => !v); + + return ( + + +
    +
    + + +
    +
    + + } + source={ + + + + + + + +`} +/> + } + /> +
    + ); +}; + +export default Details; diff --git a/sitemap.xml b/sitemap.xml index 4d3bd86..5de195c 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -30,5 +30,6 @@ https://csslayout.io/stepper-input https://csslayout.io/switch https://csslayout.io/tab + https://csslayout.io/toggle-password-visibility https://csslayout.io/wizard \ No newline at end of file