From c92b4a04c4e76f9cafd822e6cec6519d5ee42ce7 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Sat, 8 Oct 2022 19:29:14 +0000 Subject: [PATCH] Add classnames package, use that for a few components that were manually constructing classnames. --- bemani/frontend/static/classnames.min.js | 1 + .../static/components/labelledsection.react.js | 15 +++++---------- bemani/frontend/static/components/nav.react.js | 8 +------- bemani/frontend/static/components/slider.react.js | 2 +- bemani/frontend/templates/base.html | 1 + 5 files changed, 9 insertions(+), 18 deletions(-) create mode 100644 bemani/frontend/static/classnames.min.js diff --git a/bemani/frontend/static/classnames.min.js b/bemani/frontend/static/classnames.min.js new file mode 100644 index 0000000..fb8f747 --- /dev/null +++ b/bemani/frontend/static/classnames.min.js @@ -0,0 +1 @@ +!function(){"use strict";var f={}.hasOwnProperty;function s(){for(var e=[],t=0;t
{this.props.label}
{this.props.children}
diff --git a/bemani/frontend/static/components/nav.react.js b/bemani/frontend/static/components/nav.react.js index 55bdf40..c1b5cad 100644 --- a/bemani/frontend/static/components/nav.react.js +++ b/bemani/frontend/static/components/nav.react.js @@ -2,12 +2,6 @@ var Nav = createReactClass({ render: function() { - var cls = 'nav'; - if (this.props.active) { - cls += ' active'; - } - cls += " " + this.props.title; - var title = ( {this.props.title} @@ -19,7 +13,7 @@ var Nav = createReactClass({ ); return (