diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-21 19:41:20 +0500 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-21 19:41:20 +0500 |
| commit | fe9e39d9e4c30b25f492ea01d12e72257cede28e (patch) | |
| tree | 35dd1b0d76a7f1b5e2d54170967a24904745145e /src | |
| parent | Separate filters component (diff) | |
| download | githunt-fe9e39d9e4c30b25f492ea01d12e72257cede28e.tar.gz | |
Language and view filters
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/filters/index.js | 20 | ||||
| -rw-r--r-- | src/components/filters/language-filter/index.js | 53 | ||||
| -rw-r--r-- | src/components/filters/language-filter/languages.json | 1222 | ||||
| -rw-r--r-- | src/components/filters/language-filter/styles.css | 98 | ||||
| -rw-r--r-- | src/components/filters/styles.css | 33 | ||||
| -rw-r--r-- | src/components/filters/view-filter/index.js | 20 | ||||
| -rw-r--r-- | src/components/filters/view-filter/styles.css | 20 | ||||
| -rw-r--r-- | src/global.css | 8 |
8 files changed, 1432 insertions, 42 deletions
diff --git a/src/components/filters/index.js b/src/components/filters/index.js index aa5860b..521e486 100644 --- a/src/components/filters/index.js +++ b/src/components/filters/index.js @@ -1,22 +1,16 @@ import React from 'react'; +import LanguageFilter from './language-filter'; +import ViewFilter from './view-filter'; import './styles.css'; const Filters = (props) => ( <div className="filters-wrap"> - <a href="#" className="btn btn-light language-filter"> - <i className="fa fa-filter mr-2"></i> - All Languages - </a> - <div className="view-type btn"> - <a href="#" className="active"> - <i className="fa fa-list mr-2"></i> - List - </a> - <a href="#"> - <i className="fa fa-table mr-2"></i> - Grid - </a> + <div className="filter-item"> + <LanguageFilter/> + </div> + <div className="filter-item"> + <ViewFilter/> </div> </div> ); diff --git a/src/components/filters/language-filter/index.js b/src/components/filters/language-filter/index.js new file mode 100644 index 0000000..51fc626 --- /dev/null +++ b/src/components/filters/language-filter/index.js @@ -0,0 +1,53 @@ +import React from 'react'; + +import './styles.css'; +import languages from './languages'; + +class LanguageFilter extends React.Component { + + state = { + selected: '' + }; + + renderLanguages() { + const availableLanguages = [ + { + title: 'All Languages', + value: '' + }, + ...languages + ]; + + return availableLanguages.map((language, counter) => { + return ( + <a className="select-menu-item" key={ counter }> + <span className="select-menu-item-text js-select-button-text js-navigation-open">{ language.title }</span> + </a> + ); + }); + } + + render() { + return ( + <div className='language-filter-wrap'> + <a href="#" className="btn btn-light language-filter shadowed"> + <i className="fa fa-filter mr-2"></i> + { this.state.selected || 'All Languages' } + </a> + <div className="language-select"> + <div className="select-menu-header"> + <span className="select-menu-title">Search Language</span> + </div> + <div className="select-menu-filters"> + <div className="select-menu-text-filter"> + <input type="text" id="text-filter-field" className="form-control js-filterable-field js-navigation-enable" placeholder="Filter Languages" aria-label="Type or choose a language"/> + </div> + </div> + <div className="select-menu-list">{ this.renderLanguages() }</div> + </div> + </div> + ); + } +} + +export default LanguageFilter; diff --git a/src/components/filters/language-filter/languages.json b/src/components/filters/language-filter/languages.json new file mode 100644 index 0000000..b0ddf6f --- /dev/null +++ b/src/components/filters/language-filter/languages.json @@ -0,0 +1,1222 @@ +[ + { + "title": "ABAP", + "value": "ABAP" + }, + { + "title": "ActionScript", + "value": "ActionScript" + }, + { + "title": "Ada", + "value": "Ada" + }, + { + "title": "Agda", + "value": "Agda" + }, + { + "title": "AGS", + "value": "AGS" + }, + { + "title": "Alloy", + "value": "Alloy" + }, + { + "title": "AMPL", + "value": "AMPL" + }, + { + "title": "ANTLR", + "value": "ANTLR" + }, + { + "title": "ApacheConf", + "value": "ApacheConf" + }, + { + "title": "Apex", + "value": "Apex" + }, + { + "title": "API", + "value": "API" + }, + { + "title": "APL", + "value": "APL" + }, + { + "title": "AppleScript", + "value": "AppleScript" + }, + { + "title": "Arc", + "value": "Arc" + }, + { + "title": "Arduino", + "value": "Arduino" + }, + { + "title": "ASP", + "value": "ASP" + }, + { + "title": "AspectJ", + "value": "AspectJ" + }, + { + "title": "Assembly", + "value": "Assembly" + }, + { + "title": "ATS", + "value": "ATS" + }, + { + "title": "Augeas", + "value": "Augeas" + }, + { + "title": "AutoHotkey", + "value": "AutoHotkey" + }, + { + "title": "AutoIt", + "value": "AutoIt" + }, + { + "title": "Awk", + "value": "Awk" + }, + { + "title": "Batchfile", + "value": "Batchfile" + }, + { + "title": "Befunge", + "value": "Befunge" + }, + { + "title": "Bison", + "value": "Bison" + }, + { + "title": "BitBake", + "value": "BitBake" + }, + { + "title": "BlitzBasic", + "value": "BlitzBasic" + }, + { + "title": "BlitzMax", + "value": "BlitzMax" + }, + { + "title": "Bluespec", + "value": "Bluespec" + }, + { + "title": "Boo", + "value": "Boo" + }, + { + "title": "Brainfuck", + "value": "Brainfuck" + }, + { + "title": "Brightscript", + "value": "Brightscript" + }, + { + "title": "Bro", + "value": "Bro" + }, + { + "title": "C", + "value": "C" + }, + { + "title": "CSharp", + "value": "CSharp" + }, + { + "title": "C", + "value": "C" + }, + { + "title": "Cap", + "value": "Cap" + }, + { + "title": "CartoCSS", + "value": "CartoCSS" + }, + { + "title": "Ceylon", + "value": "Ceylon" + }, + { + "title": "Chapel", + "value": "Chapel" + }, + { + "title": "Charity", + "value": "Charity" + }, + { + "title": "ChucK", + "value": "ChucK" + }, + { + "title": "Cirru", + "value": "Cirru" + }, + { + "title": "Clarion", + "value": "Clarion" + }, + { + "title": "Clean", + "value": "Clean" + }, + { + "title": "Click", + "value": "Click" + }, + { + "title": "CLIPS", + "value": "CLIPS" + }, + { + "title": "Clojure", + "value": "Clojure" + }, + { + "title": "CMake", + "value": "CMake" + }, + { + "title": "COBOL", + "value": "COBOL" + }, + { + "title": "CoffeeScript", + "value": "CoffeeScript" + }, + { + "title": "ColdFusion", + "value": "ColdFusion" + }, + { + "title": "Common", + "value": "Common" + }, + { + "title": "Component", + "value": "Component" + }, + { + "title": "Cool", + "value": "Cool" + }, + { + "title": "Coq", + "value": "Coq" + }, + { + "title": "Crystal", + "value": "Crystal" + }, + { + "title": "CSS", + "value": "CSS" + }, + { + "title": "Cucumber", + "value": "Cucumber" + }, + { + "title": "Cuda", + "value": "Cuda" + }, + { + "title": "Cycript", + "value": "Cycript" + }, + { + "title": "D", + "value": "D" + }, + { + "title": "Darcs", + "value": "Darcs" + }, + { + "title": "Dart", + "value": "Dart" + }, + { + "title": "Diff", + "value": "Diff" + }, + { + "title": "DIGITAL", + "value": "DIGITAL" + }, + { + "title": "DM", + "value": "DM" + }, + { + "title": "Dogescript", + "value": "Dogescript" + }, + { + "title": "DTrace", + "value": "DTrace" + }, + { + "title": "Dylan", + "value": "Dylan" + }, + { + "title": "E", + "value": "E" + }, + { + "title": "Eagle", + "value": "Eagle" + }, + { + "title": "eC", + "value": "eC" + }, + { + "title": "ECL", + "value": "ECL" + }, + { + "title": "Eiffel", + "value": "Eiffel" + }, + { + "title": "Elixir", + "value": "Elixir" + }, + { + "title": "Elm", + "value": "Elm" + }, + { + "title": "Emacs", + "value": "Emacs" + }, + { + "title": "EmberScript", + "value": "EmberScript" + }, + { + "title": "Erlang", + "value": "Erlang" + }, + { + "title": "F", + "value": "F" + }, + { + "title": "Factor", + "value": "Factor" + }, + { + "title": "Fancy", + "value": "Fancy" + }, + { + "title": "Fantom", + "value": "Fantom" + }, + { + "title": "FLUX", + "value": "FLUX" + }, + { + "title": "Forth", + "value": "Forth" + }, + { + "title": "FORTRAN", + "value": "FORTRAN" + }, + { + "title": "FreeMarker", + "value": "FreeMarker" + }, + { + "title": "Frege", + "value": "Frege" + }, + { + "title": "Game", + "value": "Game" + }, + { + "title": "GAMS", + "value": "GAMS" + }, + { + "title": "GAP", + "value": "GAP" + }, + { + "title": "GDScript", + "value": "GDScript" + }, + { + "title": "Genshi", + "value": "Genshi" + }, + { + "title": "Gettext", + "value": "Gettext" + }, + { + "title": "GLSL", + "value": "GLSL" + }, + { + "title": "Glyph", + "value": "Glyph" + }, + { + "title": "Gnuplot", + "value": "Gnuplot" + }, + { + "title": "Go", + "value": "Go" + }, + { + "title": "Golo", + "value": "Golo" + }, + { + "title": "Gosu", + "value": "Gosu" + }, + { + "title": "Grace", + "value": "Grace" + }, + { + "title": "Grammatical", + "value": "Grammatical" + }, + { + "title": "Groff", + "value": "Groff" + }, + { + "title": "Groovy", + "value": "Groovy" + }, + { + "title": "Hack", + "value": "Hack" + }, + { + "title": "Handlebars", + "value": "Handlebars" + }, + { + "title": "Harbour", + "value": "Harbour" + }, + { + "title": "Haskell", + "value": "Haskell" + }, + { + "title": "Haxe", + "value": "Haxe" + }, + { + "title": "HCL", + "value": "HCL" + }, + { + "title": "HLSL", + "value": "HLSL" + }, + { + "title": "HTML", + "value": "HTML" + }, + { + "title": "Hy", + "value": "Hy" + }, + { + "title": "HyPhy", + "value": "HyPhy" + }, + { + "title": "IDL", + "value": "IDL" + }, + { + "title": "Idris", + "value": "Idris" + }, + { + "title": "IGOR", + "value": "IGOR" + }, + { + "title": "Inform", + "value": "Inform" + }, + { + "title": "Inno", + "value": "Inno" + }, + { + "title": "Io", + "value": "Io" + }, + { + "title": "Ioke", + "value": "Ioke" + }, + { + "title": "Isabelle", + "value": "Isabelle" + }, + { + "title": "J", + "value": "J" + }, + { + "title": "Jasmin", + "value": "Jasmin" + }, + { + "title": "Java", + "value": "Java" + }, + { + "title": "JavaScript", + "value": "JavaScript" + }, + { + "title": "JFlex", + "value": "JFlex" + }, + { + "title": "JSONiq", + "value": "JSONiq" + }, + { + "title": "Julia", + "value": "Julia" + }, + { + "title": "Jupyter", + "value": "Jupyter" + }, + { + "title": "KiCad", + "value": "KiCad" + }, + { + "title": "Kit", + "value": "Kit" + }, + { + "title": "Kotlin", + "value": "Kotlin" + }, + { + "title": "KRL", + "value": "KRL" + }, + { + "title": "LabVIEW", + "value": "LabVIEW" + }, + { + "title": "Lasso", + "value": "Lasso" + }, + { + "title": "Lean", + "value": "Lean" + }, + { + "title": "Lex", + "value": "Lex" + }, + { + "title": "LilyPond", + "value": "LilyPond" + }, + { + "title": "Limbo", + "value": "Limbo" + }, + { + "title": "Liquid", + "value": "Liquid" + }, + { + "title": "LiveScript", + "value": "LiveScript" + }, + { + "title": "LLVM", + "value": "LLVM" + }, + { + "title": "Logos", + "value": "Logos" + }, + { + "title": "Logtalk", + "value": "Logtalk" + }, + { + "title": "LOLCODE", + "value": "LOLCODE" + }, + { + "title": "LookML", + "value": "LookML" + }, + { + "title": "LoomScript", + "value": "LoomScript" + }, + { + "title": "LSL", + "value": "LSL" + }, + { + "title": "Lua", + "value": "Lua" + }, + { + "title": "M", + "value": "M" + }, + { + "title": "M4", + "value": "M4" + }, + { + "title": "Makefile", + "value": "Makefile" + }, + { + "title": "Mako", + "value": "Mako" + }, + { + "title": "Markdown", + "value": "Markdown" + }, + { + "title": "Mask", + "value": "Mask" + }, + { + "title": "Mathematica", + "value": "Mathematica" + }, + { + "title": "Matlab", + "value": "Matlab" + }, + { + "title": "Max", + "value": "Max" + }, + { + "title": "MAXScript", + "value": "MAXScript" + }, + { + "title": "Mercury", + "value": "Mercury" + }, + { + "title": "Metal", + "value": "Metal" + }, + { + "title": "MiniD", + "value": "MiniD" + }, + { + "title": "Mirah", + "value": "Mirah" + }, + { + "title": "Modelica", + "value": "Modelica" + }, + { + "title": "Modula", + "value": "Modula" + }, + { + "title": "Module", + "value": "Module" + }, + { + "title": "Monkey", + "value": "Monkey" + }, + { + "title": "Moocode", + "value": "Moocode" + }, + { + "title": "MoonScript", + "value": "MoonScript" + }, + { + "title": "MTML", + "value": "MTML" + }, + { + "title": "mupad", + "value": "mupad" + }, + { + "title": "Myghty", + "value": "Myghty" + }, + { + "title": "NCL", + "value": "NCL" + }, + { + "title": "Nemerle", + "value": "Nemerle" + }, + { + "title": "nesC", + "value": "nesC" + }, + { + "title": "NetLinx", + "value": "NetLinx" + }, + { + "title": "NetLinx", + "value": "NetLinx" + }, + { + "title": "NetLogo", + "value": "NetLogo" + }, + { + "title": "NewLisp", + "value": "NewLisp" + }, + { + "title": "Nginx", + "value": "Nginx" + }, + { + "title": "Nimrod", + "value": "Nimrod" + }, + { + "title": "Nit", + "value": "Nit" + }, + { + "title": "Nix", + "value": "Nix" + }, + { + "title": "NSIS", + "value": "NSIS" + }, + { + "title": "Nu", + "value": "Nu" + }, + { + "title": "Objective", + "value": "Objective" + }, + { + "title": "Objective", + "value": "Objective" + }, + { + "title": "Objective", + "value": "Objective" + }, + { + "title": "OCaml", + "value": "OCaml" + }, + { + "title": "Omgrofl", + "value": "Omgrofl" + }, + { + "title": "ooc", + "value": "ooc" + }, + { + "title": "Opa", + "value": "Opa" + }, + { + "title": "Opal", + "value": "Opal" + }, + { + "title": "OpenEdge", + "value": "OpenEdge" + }, + { + "title": "OpenSCAD", + "value": "OpenSCAD" + }, + { + "title": "Ox", + "value": "Ox" + }, + { + "title": "Oxygene", + "value": "Oxygene" + }, + { + "title": "Oz", + "value": "Oz" + }, + { + "title": "Pan", + "value": "Pan" + }, + { + "title": "Papyrus", + "value": "Papyrus" + }, + { + "title": "Parrot", + "value": "Parrot" + }, + { + "title": "Pascal", + "value": "Pascal" + }, + { + "title": "PAWN", + "value": "PAWN" + }, + { + "title": "Perl", + "value": "Perl" + }, + { + "title": "Perl6", + "value": "Perl6" + }, + { + "title": "PHP", + "value": "PHP" + }, + { + "title": "PicoLisp", + "value": "PicoLisp" + }, + { + "title": "PigLatin", + "value": "PigLatin" + }, + { + "title": "Pike", + "value": "Pike" + }, + { + "title": "PLpgSQL", + "value": "PLpgSQL" + }, + { + "title": "PLSQL", + "value": "PLSQL" + }, + { + "title": "PogoScript", + "value": "PogoScript" + }, + { + "title": "Pony", + "value": "Pony" + }, + { + "title": "PostScript", + "value": "PostScript" + }, + { + "title": "POV", + "value": "POV" + }, + { + "title": "PowerShell", + "value": "PowerShell" + }, + { + "title": "Processing", + "value": "Processing" + }, + { + "title": "Prolog", + "value": "Prolog" + }, + { + "title": "Propeller", + "value": "Propeller" + }, + { + "title": "Protocol", + "value": "Protocol" + }, + { + "title": "Puppet", + "value": "Puppet" + }, + { + "title": "Pure", + "value": "Pure" + }, + { + "title": "PureBasic", + "value": "PureBasic" + }, + { + "title": "PureScript", + "value": "PureScript" + }, + { + "title": "Python", + "value": "Python" + }, + { + "title": "QMake", + "value": "QMake" + }, + { + "title": "QML", + "value": "QML" + }, + { + "title": "R", + "value": "R" + }, + { + "title": "Racket", + "value": "Racket" + }, + { + "title": "Ragel", + "value": "Ragel" + }, + { + "title": "RAML", + "value": "RAML" + }, + { + "title": "RDoc", + "value": "RDoc" + }, + { + "title": "REALbasic", + "value": "REALbasic" + }, + { + "title": "Rebol", + "value": "Rebol" + }, + { + "title": "Red", + "value": "Red" + }, + { + "title": "Redcode", + "value": "Redcode" + }, + { + "title": "Ren", + "value": "Ren" + }, + { + "title": "RenderScript", + "value": "RenderScript" + }, + { + "title": "RobotFramework", + "value": "RobotFramework" + }, + { + "title": "Rouge", + "value": "Rouge" + }, + { + "title": "Ruby", + "value": "Ruby" + }, + { + "title": "Rust", + "value": "Rust" + }, + { + "title": "SaltStack", + "value": "SaltStack" + }, + { + "title": "SAS", + "value": "SAS" + }, + { + "title": "Scala", + "value": "Scala" + }, + { + "title": "Scheme", + "value": "Scheme" + }, + { + "title": "Scilab", + "value": "Scilab" + }, + { + "title": "Self", + "value": "Self" + }, + { + "title": "Shell", + "value": "Shell" + }, + { + "title": "ShellSession", + "value": "ShellSession" + }, + { + "title": "Shen", + "value": "Shen" + }, + { + "title": "Slash", + "value": "Slash" + }, + { + "title": "Smali", + "value": "Smali" + }, + { + "title": "Smalltalk", + "value": "Smalltalk" + }, + { + "title": "Smarty", + "value": "Smarty" + }, + { + "title": "SMT", + "value": "SMT" + }, + { + "title": "SourcePawn", + "value": "SourcePawn" + }, + { + "title": "SQF", + "value": "SQF" + }, + { + "title": "SQL", + "value": "SQL" + }, + { + "title": "SQLPL", + "value": "SQLPL" + }, + { + "title": "Squirrel", + "value": "Squirrel" + }, + { + "title": "Stan", + "value": "Stan" + }, + { + "title": "Standard", + "value": "Standard" + }, + { + "title": "Stata", + "value": "Stata" + }, + { + "title": "SuperCollider", + "value": "SuperCollider" + }, + { + "title": "Swift", + "value": "Swift" + }, + { + "title": "SystemVerilog", + "value": "SystemVerilog" + }, + { + "title": "Tcl", + "value": "Tcl" + }, + { + "title": "Tea", + "value": "Tea" + }, + { + "title": "TeX", + "value": "TeX" + }, + { + "title": "Thrift", + "value": "Thrift" + }, + { + "title": "Turing", + "value": "Turing" + }, + { + "title": "TXL", + "value": "TXL" + }, + { + "title": "TypeScript", + "value": "TypeScript" + }, + { + "title": "Uno", + "value": "Uno" + }, + { + "title": "UnrealScript", + "value": "UnrealScript" + }, + { + "title": "UrWeb", + "value": "UrWeb" + }, + { + "title": "Vala", + "value": "Vala" + }, + { + "title": "VCL", + "value": "VCL" + }, + { + "title": "Verilog", + "value": "Verilog" + }, + { + "title": "VHDL", + "value": "VHDL" + }, + { + "title": "VimL", + "value": "VimL" + }, + { + "title": "Visual", + "value": "Visual" + }, + { + "title": "Volt", + "value": "Volt" + }, + { + "title": "Vue", + "value": "Vue" + }, + { + "title": "Web", + "value": "Web" + }, + { + "title": "WebIDL", + "value": "WebIDL" + }, + { + "title": "wisp", + "value": "wisp" + }, + { + "title": "X10", + "value": "X10" + }, + { + "title": "xBase", + "value": "xBase" + }, + { + "title": "XC", + "value": "XC" + }, + { + "title": "XML", + "value": "XML" + }, + { + "title": "Xojo", + "value": "Xojo" + }, + { + "title": "XPages", + "value": "XPages" + }, + { + "title": "XProc", + "value": "XProc" + }, + { + "title": "XQuery", + "value": "XQuery" + }, + { + "title": "XS", + "value": "XS" + }, + { + "title": "XSLT", + "value": "XSLT" + }, + { + "title": "Xtend", + "value": "Xtend" + }, + { + "title": "Yacc", + "value": "Yacc" + }, + { + "title": "Zephir", + "value": "Zephir" + }, + { + "title": "Zimpl", + "value": "Zimpl" + } +] diff --git a/src/components/filters/language-filter/styles.css b/src/components/filters/language-filter/styles.css new file mode 100644 index 0000000..74a6cae --- /dev/null +++ b/src/components/filters/language-filter/styles.css @@ -0,0 +1,98 @@ +.language-filter-wrap { + position: relative; +} + +.language-filter { + border-radius: 8px; + padding: 10px 20px; + background: white; + cursor: default; + display: block; +} + +.language-select { + position: absolute; + top: 100%; + width: 300px; + margin-top: 5px; + overflow: hidden; + font-size: 12px; + color: #586069; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #e8e8e8; + border-radius: 8px; + box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15); +} + +.select-menu-header, .select-menu-divider { + padding: 12px 10px; + background: white; + border-bottom: 1px solid #e8e8e8; + font-size: 15px; +} + +.select-menu-header .select-menu-title, .select-menu-divider { + font-weight: 600; + color: #24292e; +} + +.select-menu-filters { + background-color: #f4f4f4; +} + +.select-menu-text-filter { + padding: 10px; + border-bottom: 1px solid #e8e8e8; +} + +.select-menu-text-filter input { + display: block; + font-size: 14px; + width: 100%; + max-width: 100%; + border: 1px solid #dfe2e5 !important; + padding: 5px 10px !important; + border-radius: 3px; + box-shadow: none !important; + outline: none !important; +} + +.select-menu-list { + position: relative; + max-height: 400px; + overflow: auto; +} + +.select-menu-item { + text-align: left; + background-color: #fff; + border-top: 0; + border-right: 0; + border-left: 0; + display: block; + padding: 10px 8px 10px 16px; + overflow: hidden; + color: inherit; + cursor: pointer; + border-bottom: 1px solid #e8e8e8; +} + +.select-menu-item:hover .select-menu-item-text { + color: white; +} + +.select-menu-list .select-menu-item:last-child { + border-bottom: none; +} + +.select-menu-item:hover { + color: #fff; + background-color: #1157ed; + text-decoration: none; +} + +.select-menu-item-text { + display: block; + text-align: left; +} diff --git a/src/components/filters/styles.css b/src/components/filters/styles.css index 810b7f3..3a97edb 100644 --- a/src/components/filters/styles.css +++ b/src/components/filters/styles.css @@ -1,32 +1,7 @@ -.btn.view-type, .btn.language-filter { - display: inline; - box-shadow: 0 9px 62px -13px rgba(0, 0, 0, 0.20); +.filters-wrap .filter-item { + float: left; } -.filters-wrap .view-type.btn { - border-radius: 8px; - padding: 10px 20px; - background: white; - margin-left: 10px; - cursor: default; -} - -.language-filter { - border-radius: 8px; - padding: 10px 20px; - background-color: white; -} - -.view-type a { - color: #ccc; - margin-left: 20px; - text-decoration: none; -} - -.view-type a.active, .view-type a:hover { - color: #343a40; -} - -.view-type a:first-child { - margin-left: 0; +.filters-wrap .filter-item:last-child { + margin-left: 15px; } diff --git a/src/components/filters/view-filter/index.js b/src/components/filters/view-filter/index.js new file mode 100644 index 0000000..64a458a --- /dev/null +++ b/src/components/filters/view-filter/index.js @@ -0,0 +1,20 @@ +import React from 'react'; + +import './styles.css'; + +const ViewFilter = (props) => ( + <div className="view-type-wrap"> + <div className="view-type btn shadowed cursor-default"> + <a href="#" className="active"> + <i className="fa fa-list mr-2"></i> + List + </a> + <a href="#"> + <i className="fa fa-table mr-2"></i> + Grid + </a> + </div> + </div> +); + +export default ViewFilter; diff --git a/src/components/filters/view-filter/styles.css b/src/components/filters/view-filter/styles.css new file mode 100644 index 0000000..af3cd97 --- /dev/null +++ b/src/components/filters/view-filter/styles.css @@ -0,0 +1,20 @@ +.view-type { + border-radius: 8px; + padding: 10px 20px; + background: white; + cursor: default; +} + +.view-type a { + color: #ccc; + margin-left: 20px; + text-decoration: none; +} + +.view-type a.active, .view-type a:hover { + color: #343a40; +} + +.view-type a:first-child { + margin-left: 0; +} diff --git a/src/global.css b/src/global.css index 336698a..635959a 100644 --- a/src/global.css +++ b/src/global.css @@ -9,6 +9,14 @@ body { border-radius: 8px; } +.cursor-default { + cursor: default !important; +} + +.shadowed { + box-shadow: 0 9px 62px -13px rgba(0, 0, 0, 0.20) !important; +} + .btn-primary { background: #1157ed; border-color: #1157ed; |
