Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
7e74c4a1
Commit
7e74c4a1
authored
Oct 25, 2015
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use classNames everywhere with dynamic classNames
Fixes GH-141, and keeps it from being introduced on Banner
parent
ccd04889
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
src/components/banner/banner.jsx
src/components/banner/banner.jsx
+6
-1
src/components/box/box.jsx
src/components/box/box.jsx
+6
-1
src/components/carousel/carousel.jsx
src/components/carousel/carousel.jsx
+6
-2
src/views/hoc/hoc.jsx
src/views/hoc/hoc.jsx
+6
-1
No files found.
src/components/banner/banner.jsx
View file @
7e74c4a1
var
classNames
=
require
(
'
classnames
'
);
var
React
=
require
(
'
react
'
);
require
(
'
./banner.scss
'
);
...
...
@@ -8,8 +9,12 @@ var Banner = React.createClass({
onRequestDismiss
:
React
.
PropTypes
.
func
},
render
:
function
()
{
var
classes
=
classNames
(
'
banner
'
,
this
.
props
.
className
);
return
(
<
div
className=
{
'
banner
'
+
this
.
props
.
className
}
>
<
div
className=
{
classes
}
>
<
div
className=
"inner"
>
{
this
.
props
.
children
}
{
this
.
props
.
onRequestDismiss
?
[
...
...
src/components/box/box.jsx
View file @
7e74c4a1
var
classNames
=
require
(
'
classnames
'
);
var
React
=
require
(
'
react
'
);
require
(
'
./box.scss
'
);
...
...
@@ -11,8 +12,12 @@ var Box = React.createClass({
moreProps
:
React
.
PropTypes
.
object
},
render
:
function
()
{
var
classes
=
classNames
(
'
box
'
,
this
.
props
.
className
);
return
(
<
div
className=
{
'
box
'
+
this
.
props
.
className
}
>
<
div
className=
{
classes
}
>
<
div
className=
"box-header"
>
<
h4
>
{
this
.
props
.
title
}
</
h4
>
<
p
>
...
...
src/components/carousel/carousel.jsx
View file @
7e74c4a1
var
classNames
=
require
(
'
classnames
'
);
var
defaults
=
require
(
'
lodash.defaults
'
);
var
React
=
require
(
'
react
'
);
var
Slider
=
require
(
'
react-slick
'
);
...
...
@@ -31,9 +32,12 @@ var Carousel = React.createClass({
variableWidth
:
true
});
var
arrows
=
this
.
props
.
items
.
length
>
settings
.
slidesToShow
;
var
classes
=
classNames
(
'
carousel
'
,
this
.
props
.
className
);
return
(
<
Slider
className=
{
'
carousel
'
+
this
.
props
.
className
}
arrows=
{
arrows
}
{
...
settings
}
>
<
Slider
className=
{
classes
}
arrows=
{
arrows
}
{
...
settings
}
>
{
this
.
props
.
items
.
map
(
function
(
item
)
{
var
href
=
''
;
switch
(
item
.
type
)
{
...
...
src/views/hoc/hoc.jsx
View file @
7e74c4a1
var
classNames
=
require
(
'
classnames
'
);
var
React
=
require
(
'
react
'
);
var
render
=
require
(
'
../../lib/render.jsx
'
);
...
...
@@ -20,9 +21,13 @@ var Hoc = React.createClass({
});
},
render
:
function
()
{
var
classes
=
classNames
(
'
top-banner
'
,
this
.
state
.
bgClass
);
return
(
<
div
>
<
div
className=
{
'
top-banner
'
+
this
.
state
.
bgClas
s
}
>
<
div
className=
{
classe
s
}
>
<
h1
>
Get Creative with Coding
</
h1
>
<
p
>
With Scratch, you can program your own stories, games, and animations —
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment