Skip to content

Commit

Permalink
Add propTypes property to buttons
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
ipeychev committed Mar 24, 2015
1 parent ca33683 commit f9e2197
Show file tree
Hide file tree
Showing 18 changed files with 134 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/react/src/components/base/button-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
* @class ButtonCommand
*/
var ButtonCommand = {
/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
command: React.PropTypes.string.isRequired
},
Expand Down
5 changes: 5 additions & 0 deletions src/ui/react/src/components/base/button-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* @class ButtonStyle
*/
var ButtonStyle = {
/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
style: React.PropTypes.object
},
Expand Down
5 changes: 5 additions & 0 deletions src/ui/react/src/components/base/widget-focus-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
* @class WidgetFocusManager
*/
var WidgetFocusManager = {
/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
circular: React.PropTypes.bool.isRequired,
descendants: React.PropTypes.string.isRequired,
Expand Down
5 changes: 5 additions & 0 deletions src/ui/react/src/components/base/widget-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
var WidgetPosition = {
mixins: [global.WidgetInteractionPoint],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
gutter: React.PropTypes.object
},
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-bold.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonBold = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-hline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonHline = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-italic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonItalic = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-ol.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonOrderedList = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-quote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonQuote = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-remove-format.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonRemoveFormat = React.createClass({
mixins: [global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-strike.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonStrike = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
* @class ButtonStylesListItemRemove
*/
var ButtonStylesListItemRemove = React.createClass({
/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
removeBlocks: React.PropTypes.array
},
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-subscript.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonSubscript = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-superscript.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonSuperscript = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-twitter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonTwitter = React.createClass({
mixins: [global.ButtonStateClasses],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-ul.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonUnorderedlist = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
9 changes: 9 additions & 0 deletions src/ui/react/src/components/buttons/button-underline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
var ButtonUnderline = React.createClass({
mixins: [global.ButtonStyle, global.ButtonStateClasses, global.ButtonCommand],

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
editor: React.PropTypes.object.isRequired
},

/**
* Lifecycle. Provides static properties to the widget.
* - key: The name which will be used as an alias of the button in the configuration.
Expand Down
1 change: 1 addition & 0 deletions src/ui/react/src/components/toolbars/toolbar-add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* Allows validating props being passed to the component.
*
* @type {Object}
*/
propTypes: {
Expand Down

0 comments on commit f9e2197

Please sign in to comment.