revelry_core 0.1.11.1 → 0.1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3103f059a1494d5ff841c90f06fde124010b0a19
|
4
|
+
data.tar.gz: d7e5c5e80333f6c39adb2b3e3602ec820078b8d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec039c7027c6217a33796e6b03eba0e51f609e21635f6ae78f069aae088b84c70bd0d7f0da2dc22dd65e2a058367cd070cadf0508283bd33b14808b173dfe4d6
|
7
|
+
data.tar.gz: c48004aaa1c3de8e5a4c1a547542d3f0c04ebedb9aa9ae606168d67d9bdc067bb77143ab9866bc06619ac3ea26126c1b74c62965d8c229571bd850bfa96614e6
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# <Icon type="Foundation" icon="cog" className="left" />
|
2
|
+
Rev.registerComponent 'Icon',
|
3
|
+
statics:
|
4
|
+
Adapters:
|
5
|
+
FontAwesome: (icon) -> "fa fa-#{icon}"
|
6
|
+
IconMoon: (icon) -> "icon-#{icon}"
|
7
|
+
Foundation: (icon) -> "fi-#{icon}"
|
8
|
+
|
9
|
+
typeToAdapter: (type) ->
|
10
|
+
adapter = @Adapters[type]
|
11
|
+
throw new Error("Invalid Icon type `#{type}`") unless adapter
|
12
|
+
adapter
|
13
|
+
|
14
|
+
defaultType: "IconMoon"
|
15
|
+
|
16
|
+
propTypes:
|
17
|
+
icon: React.PropTypes.string
|
18
|
+
type: React.PropTypes.string
|
19
|
+
|
20
|
+
getDefaultProps: ->
|
21
|
+
type: @defaultType
|
22
|
+
|
23
|
+
getAdapterClassName: ->
|
24
|
+
@constructor.typeToAdapter(@props.type)(@props.icon)
|
25
|
+
|
26
|
+
render: ->
|
27
|
+
classNameObject =
|
28
|
+
RevIcon: true
|
29
|
+
|
30
|
+
classNameObject["RevIcon-#{@props.icon}"] = true
|
31
|
+
classNameObject[@getAdapterClassName()] = true
|
32
|
+
|
33
|
+
className = @classAdd classNameObject
|
34
|
+
|
35
|
+
<i {...@props} className={className} />
|
data/lib/revelry_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revelry_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.11.
|
4
|
+
version: 0.1.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Revelry Labs, LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- app/assets/javascripts/revelry/examples/Buttons.js.cjsx
|
326
326
|
- app/assets/javascripts/revelry/examples/Forms.js.cjsx
|
327
327
|
- app/assets/javascripts/revelry/examples/Grid.js.cjsx
|
328
|
+
- app/assets/javascripts/revelry/examples/Icons.js.cjsx
|
328
329
|
- app/assets/javascripts/revelry/examples/Modals.js.cjsx
|
329
330
|
- app/assets/javascripts/revelry/examples/ModelForm.js.cjsx
|
330
331
|
- app/assets/javascripts/revelry/examples/ModelHasManyInput.js.cjsx
|
@@ -379,6 +380,7 @@ files:
|
|
379
380
|
- app/assets/javascripts/revelry/ui/grid/BlockGrid.js.cjsx
|
380
381
|
- app/assets/javascripts/revelry/ui/grid/Col.js.cjsx
|
381
382
|
- app/assets/javascripts/revelry/ui/grid/Row.js.cjsx
|
383
|
+
- app/assets/javascripts/revelry/ui/icons/Icon.js.cjsx
|
382
384
|
- app/assets/javascripts/revelry/ui/modals/Modal.js.cjsx
|
383
385
|
- app/assets/javascripts/revelry/ui/navigation/IconBar.js.cjsx
|
384
386
|
- app/assets/javascripts/revelry/ui/navigation/IconBarItem.js.cjsx
|