From 6393b96e84e1236380c7cc258eeeb31bea88b2da Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Sun, 17 Nov 2019 10:29:57 +0700 Subject: [PATCH] Add button with icon --- client/App.jsx | 2 + client/Home.jsx | 53 ++++++++++++++----------- client/covers/ButtonWithIconCover.jsx | 20 ++++++++++ client/layouts/ButtonWithIcon.jsx | 56 +++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 23 deletions(-) create mode 100644 client/covers/ButtonWithIconCover.jsx create mode 100644 client/layouts/ButtonWithIcon.jsx diff --git a/client/App.jsx b/client/App.jsx index 8917c4b..f330167 100644 --- a/client/App.jsx +++ b/client/App.jsx @@ -3,6 +3,7 @@ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import Home from './Home'; import Badge from './layouts/Badge'; +import ButtonWithIcon from './layouts/ButtonWithIcon'; import Centering from './layouts/Centering'; import HolyGrail from './layouts/HolyGrail'; import InputAddon from './layouts/InputAddon'; @@ -18,6 +19,7 @@ const App = () => { + diff --git a/client/Home.jsx b/client/Home.jsx index f73df5a..ee123fc 100644 --- a/client/Home.jsx +++ b/client/Home.jsx @@ -2,6 +2,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import BadgeCover from './covers/BadgeCover'; +import ButtonWithIconCover from './covers/ButtonWithIconCover'; import CenterCover from './covers/CenterCover'; import HolyGrailCover from './covers/HolyGrailCover'; import InputAddonCover from './covers/InputAddonCover'; @@ -35,62 +36,68 @@ const Home = () => {

Layouts

-
-
- +
+
+

Holy grail

-
- +
+

Sidebar

-
- +
+

Sticky footer

-
- - -

Sticky header

- +
+ + +

Sticky header

+

Patterns

-
-
- +
+
+

Badge

-
- +
+ + +

Button with icon

+ +
+
+

Centering

-
- +
+

Input addon

-
- +
+

Media object

-
- +
+

Stepper input

diff --git a/client/covers/ButtonWithIconCover.jsx b/client/covers/ButtonWithIconCover.jsx new file mode 100644 index 0000000..03cff62 --- /dev/null +++ b/client/covers/ButtonWithIconCover.jsx @@ -0,0 +1,20 @@ +import React from 'react'; + +import Dot from '../placeholders/Dot'; +import Frame from '../placeholders/Frame'; +import Rectangle from '../placeholders/Rectangle'; + +const ButtonWithIconCover = () => { + return ( + +
+
+
+ +
+
+ + ); +}; + +export default ButtonWithIconCover; diff --git a/client/layouts/ButtonWithIcon.jsx b/client/layouts/ButtonWithIcon.jsx new file mode 100644 index 0000000..7f9dfbd --- /dev/null +++ b/client/layouts/ButtonWithIcon.jsx @@ -0,0 +1,56 @@ +import React from 'react'; + +import DetailsLayout from '../DetailsLayout'; +import Dot from '../placeholders/Dot'; +import BrowserFrame from '../placeholders/BrowserFrame'; +import Rectangle from '../placeholders/Rectangle'; +import SampleCode from '../SampleCode'; +import useDocumentTitle from '../useDocumentTitle'; + +const ButtonWithIcon = () => { + useDocumentTitle('CSS Layout ∙ Button with icon'); + + return ( + +

Button with icon

+ +
+
+
+ +
+
+
+ } + source={ + + 1 +
+`} +/> + } + /> + + ); +}; + +export default ButtonWithIcon;