Skip to content

Commit f53bcf5

Browse files
committed
[fixed] 'bsSize' and 'bsStyle' properties has been removed from 'Glyphicon'
because they did nothing.
1 parent 4a8129c commit f53bcf5

File tree

2 files changed

+20
-272
lines changed

2 files changed

+20
-272
lines changed

src/Glyphicon.js

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import React from 'react';
22
import classNames from 'classnames';
3-
import BootstrapMixin from './BootstrapMixin';
4-
import styleMaps from './styleMaps';
53

64
const Glyphicon = React.createClass({
7-
mixins: [BootstrapMixin],
8-
95
propTypes: {
10-
glyph: React.PropTypes.oneOf(styleMaps.GLYPHS).isRequired,
6+
/**
7+
* bootstrap className
8+
* @private
9+
*/
10+
bsClass: React.PropTypes.string,
11+
/**
12+
* An icon name
13+
*/
14+
glyph: React.PropTypes.string.isRequired,
15+
/**
16+
* Adds 'form-control-feedback' class
17+
* @private
18+
*/
1119
formControlFeedback: React.PropTypes.bool
1220
},
1321

@@ -19,13 +27,14 @@ const Glyphicon = React.createClass({
1927
},
2028

2129
render() {
22-
let classes = this.getBsClassSet();
23-
24-
classes['glyphicon-' + this.props.glyph] = true;
25-
classes['form-control-feedback'] = this.props.formControlFeedback;
30+
let className = classNames(this.props.className, {
31+
[this.props.bsClass]: true,
32+
['glyphicon-' + this.props.glyph]: true,
33+
['form-control-feedback']: this.props.formControlFeedback
34+
});
2635

2736
return (
28-
<span {...this.props} className={classNames(this.props.className, classes)}>
37+
<span {...this.props} className={className}>
2938
{this.props.children}
3039
</span>
3140
);

src/styleMaps.js

+1-262
Original file line numberDiff line numberDiff line change
@@ -45,268 +45,7 @@ const styleMaps = {
4545
'md': 'md',
4646
'sm': 'sm',
4747
'xs': 'xs'
48-
},
49-
GLYPHS: [
50-
'asterisk',
51-
'plus',
52-
'euro',
53-
'eur',
54-
'minus',
55-
'cloud',
56-
'envelope',
57-
'pencil',
58-
'glass',
59-
'music',
60-
'search',
61-
'heart',
62-
'star',
63-
'star-empty',
64-
'user',
65-
'film',
66-
'th-large',
67-
'th',
68-
'th-list',
69-
'ok',
70-
'remove',
71-
'zoom-in',
72-
'zoom-out',
73-
'off',
74-
'signal',
75-
'cog',
76-
'trash',
77-
'home',
78-
'file',
79-
'time',
80-
'road',
81-
'download-alt',
82-
'download',
83-
'upload',
84-
'inbox',
85-
'play-circle',
86-
'repeat',
87-
'refresh',
88-
'list-alt',
89-
'lock',
90-
'flag',
91-
'headphones',
92-
'volume-off',
93-
'volume-down',
94-
'volume-up',
95-
'qrcode',
96-
'barcode',
97-
'tag',
98-
'tags',
99-
'book',
100-
'bookmark',
101-
'print',
102-
'camera',
103-
'font',
104-
'bold',
105-
'italic',
106-
'text-height',
107-
'text-width',
108-
'align-left',
109-
'align-center',
110-
'align-right',
111-
'align-justify',
112-
'list',
113-
'indent-left',
114-
'indent-right',
115-
'facetime-video',
116-
'picture',
117-
'map-marker',
118-
'adjust',
119-
'tint',
120-
'edit',
121-
'share',
122-
'check',
123-
'move',
124-
'step-backward',
125-
'fast-backward',
126-
'backward',
127-
'play',
128-
'pause',
129-
'stop',
130-
'forward',
131-
'fast-forward',
132-
'step-forward',
133-
'eject',
134-
'chevron-left',
135-
'chevron-right',
136-
'plus-sign',
137-
'minus-sign',
138-
'remove-sign',
139-
'ok-sign',
140-
'question-sign',
141-
'info-sign',
142-
'screenshot',
143-
'remove-circle',
144-
'ok-circle',
145-
'ban-circle',
146-
'arrow-left',
147-
'arrow-right',
148-
'arrow-up',
149-
'arrow-down',
150-
'share-alt',
151-
'resize-full',
152-
'resize-small',
153-
'exclamation-sign',
154-
'gift',
155-
'leaf',
156-
'fire',
157-
'eye-open',
158-
'eye-close',
159-
'warning-sign',
160-
'plane',
161-
'calendar',
162-
'random',
163-
'comment',
164-
'magnet',
165-
'chevron-up',
166-
'chevron-down',
167-
'retweet',
168-
'shopping-cart',
169-
'folder-close',
170-
'folder-open',
171-
'resize-vertical',
172-
'resize-horizontal',
173-
'hdd',
174-
'bullhorn',
175-
'bell',
176-
'certificate',
177-
'thumbs-up',
178-
'thumbs-down',
179-
'hand-right',
180-
'hand-left',
181-
'hand-up',
182-
'hand-down',
183-
'circle-arrow-right',
184-
'circle-arrow-left',
185-
'circle-arrow-up',
186-
'circle-arrow-down',
187-
'globe',
188-
'wrench',
189-
'tasks',
190-
'filter',
191-
'briefcase',
192-
'fullscreen',
193-
'dashboard',
194-
'paperclip',
195-
'heart-empty',
196-
'link',
197-
'phone',
198-
'pushpin',
199-
'usd',
200-
'gbp',
201-
'sort',
202-
'sort-by-alphabet',
203-
'sort-by-alphabet-alt',
204-
'sort-by-order',
205-
'sort-by-order-alt',
206-
'sort-by-attributes',
207-
'sort-by-attributes-alt',
208-
'unchecked',
209-
'expand',
210-
'collapse-down',
211-
'collapse-up',
212-
'log-in',
213-
'flash',
214-
'log-out',
215-
'new-window',
216-
'record',
217-
'save',
218-
'open',
219-
'saved',
220-
'import',
221-
'export',
222-
'send',
223-
'floppy-disk',
224-
'floppy-saved',
225-
'floppy-remove',
226-
'floppy-save',
227-
'floppy-open',
228-
'credit-card',
229-
'transfer',
230-
'cutlery',
231-
'header',
232-
'compressed',
233-
'earphone',
234-
'phone-alt',
235-
'tower',
236-
'stats',
237-
'sd-video',
238-
'hd-video',
239-
'subtitles',
240-
'sound-stereo',
241-
'sound-dolby',
242-
'sound-5-1',
243-
'sound-6-1',
244-
'sound-7-1',
245-
'copyright-mark',
246-
'registration-mark',
247-
'cloud-download',
248-
'cloud-upload',
249-
'tree-conifer',
250-
'tree-deciduous',
251-
'cd',
252-
'save-file',
253-
'open-file',
254-
'level-up',
255-
'copy',
256-
'paste',
257-
'alert',
258-
'equalizer',
259-
'king',
260-
'queen',
261-
'pawn',
262-
'bishop',
263-
'knight',
264-
'baby-formula',
265-
'tent',
266-
'blackboard',
267-
'bed',
268-
'apple',
269-
'erase',
270-
'hourglass',
271-
'lamp',
272-
'duplicate',
273-
'piggy-bank',
274-
'scissors',
275-
'bitcoin',
276-
'yen',
277-
'ruble',
278-
'scale',
279-
'ice-lolly',
280-
'ice-lolly-tasted',
281-
'education',
282-
'option-horizontal',
283-
'option-vertical',
284-
'menu-hamburger',
285-
'modal-window',
286-
'oil',
287-
'grain',
288-
'sunglasses',
289-
'text-size',
290-
'text-color',
291-
'text-background',
292-
'object-align-top',
293-
'object-align-bottom',
294-
'object-align-horizontal',
295-
'object-align-left',
296-
'object-align-vertical',
297-
'object-align-right',
298-
'triangle-right',
299-
'triangle-left',
300-
'triangle-bottom',
301-
'triangle-top',
302-
'console',
303-
'superscript',
304-
'subscript',
305-
'menu-left',
306-
'menu-right',
307-
'menu-down',
308-
'menu-up'
309-
]
48+
}
31049
};
31150

31251
export default styleMaps;

0 commit comments

Comments
 (0)