diff --git a/src/components/Button/Button.jsx b/src/components/Button/Button.jsx
index 30ee52f..c2b3e58 100644
--- a/src/components/Button/Button.jsx
+++ b/src/components/Button/Button.jsx
@@ -16,68 +16,6 @@ class Button extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The button's children elements. Usually text!
- */
- children: PropTypes.node,
- /**
- * Color of the button. [primary, secondary, info, success, danger, warning]
- */
- color: PropTypes.string.isRequired,
- /**
- * Size of the button. [sm, lg]
- */
- size: PropTypes.string,
- /**
- * Determines if the button is active.
- */
- active: PropTypes.bool.isRequired,
- /**
- * Determines if the button is disabled.
- */
- disabled: PropTypes.bool.isRequired,
- /**
- * The function to fire on button click.
- */
- onClick: PropTypes.func,
- /**
- * Changes the button to a simple style.
- */
- simple: PropTypes.simple,
- /**
- * Changes the button to a rounded style.
- */
- round: PropTypes.bool,
- /**
- * Makes the button into a link button.
- */
- link: PropTypes.bool,
- /**
- * Sets the target link for a button.
- */
- href: PropTypes.string,
- /**
- * Sets the icon of a button. Can be used in junction with children.
- */
- icon: PropTypes.node,
- /**
- * Sets the href target of a button.
- */
- target: PropTypes.string,
- /**
- * Sets the social media of choice for the button. Overrides color.
- *
- * List: [ twitter, facebook, google, linkedin, pinterest, youtube, tumblr, github, behance, dribble, reddit ]
- */
- social: PropTypes.string
- }
-
- static defaultProps = {
- active: false,
- disabled: false
- }
-
getIconClassBySocial = social => {
switch(social) {
case "twitter":
@@ -126,6 +64,44 @@ class Button extends React.Component {
}
}
+Button.propTypes = {
+ /** The button's children elements. Usually text! */
+ children: PropTypes.node,
+ /** Color of the button. [primary, secondary, info, success, danger, warning] */
+ color: PropTypes.string.isRequired,
+ /** Size of the button. [sm, lg] */
+ size: PropTypes.string,
+ /** Determines if the button is active. */
+ active: PropTypes.bool.isRequired,
+ /** Determines if the button is disabled. */
+ disabled: PropTypes.bool.isRequired,
+ /** The function to fire on button click. */
+ onClick: PropTypes.func,
+ /** Changes the button to a simple style. */
+ simple: PropTypes.simple,
+ /** Changes the button to a rounded style. */
+ round: PropTypes.bool,
+ /** Makes the button into a link button. */
+ link: PropTypes.bool,
+ /** Sets the target link for a button. */
+ href: PropTypes.string,
+ /** Sets the icon of a button. Can be used in junction with children. */
+ icon: PropTypes.node,
+ /** Sets the href target of a button. */
+ target: PropTypes.string,
+ /**
+ * Sets the social media of choice for the button. Overrides color.
+ *
+ * List: [ twitter, facebook, google, linkedin, pinterest, youtube, tumblr, github, behance, dribble, reddit ]
+ */
+ social: PropTypes.string
+}
+
+Button.defaultProps = {
+ active: false,
+ disabled: false
+}
+
export { Button }
export default Button
\ No newline at end of file
diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx
index cff5113..4ddedbb 100644
--- a/src/components/Card/Card.jsx
+++ b/src/components/Card/Card.jsx
@@ -32,41 +32,6 @@ class Card extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The header of the card.
- */
- header: PropTypes.node,
- /**
- * The footer of the card.
- */
- footer: PropTypes.node,
- /**
- * The body of the card.
- */
- children: PropTypes.node.isRequired,
- /**
- * The source of the header image.
- */
- imgSrc: PropTypes.string,
- /**
- * The width of the card.
- */
- width: PropTypes.string,
- /**
- * Other style options of the card.
- */
- style: PropTypes.object,
- /**
- * The color of the card.
- */
- color: PropTypes.string
- }
-
- static defaultProps = {
- style: {}
- }
-
render() {
const { header, footer, children, imgSrc, width, style, color } = this.props
@@ -89,6 +54,27 @@ class Card extends React.Component {
}
}
+Card.propTypes = {
+ /** The header of the card. */
+ header: PropTypes.node,
+ /** The footer of the card. */
+ footer: PropTypes.node,
+ /** The body of the card. */
+ children: PropTypes.node.isRequired,
+ /** The source of the header image. */
+ imgSrc: PropTypes.string,
+ /** The width of the card. */
+ width: PropTypes.string,
+ /** Other style options of the card. */
+ style: PropTypes.object,
+ /** The color of the card. */
+ color: PropTypes.string
+}
+
+Card.defaultProps = {
+ style: {}
+}
+
export { Card }
export default Card
\ No newline at end of file
diff --git a/src/components/Checkbox/Checkbox.jsx b/src/components/Checkbox/Checkbox.jsx
index d2bbbad..de2a977 100644
--- a/src/components/Checkbox/Checkbox.jsx
+++ b/src/components/Checkbox/Checkbox.jsx
@@ -32,29 +32,6 @@ class Checkbox extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The label text.
- */
- label: PropTypes.string,
- /**
- * Function to handle change.
- */
- onChange: PropTypes.func,
- /**
- * Sets whether the checkbox is enabled or disabled.
- */
- disabled: PropTypes.bool,
- /**
- * Sets whether the checkbox is inline or not.
- */
- inline: PropTypes.bool
- }
-
- static defaultProps = {
- label: "Default text!"
- }
-
render() {
const { label, onChange, disabled, inline } = this.props
@@ -77,6 +54,21 @@ class Checkbox extends React.Component {
}
}
+Checkbox.propTypes = {
+ /** The label text. */
+ label: PropTypes.string,
+ /** Function to handle change. */
+ onChange: PropTypes.func,
+ /** Sets whether the checkbox is enabled or disabled. */
+ disabled: PropTypes.bool,
+ /** Sets whether the checkbox is inline or not. */
+ inline: PropTypes.bool
+}
+
+Checkbox.defaultProps = {
+ label: "Default text!"
+}
+
export { Checkbox }
export default Checkbox
\ No newline at end of file
diff --git a/src/components/Dropdown/Dropdown.jsx b/src/components/Dropdown/Dropdown.jsx
index f3c6197..57c09a5 100644
--- a/src/components/Dropdown/Dropdown.jsx
+++ b/src/components/Dropdown/Dropdown.jsx
@@ -32,40 +32,6 @@ class Dropdown extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * Show a caret on the toggle.
- */
- caret: PropTypes.bool,
- /**
- * Label for the dropdown button.
- */
- label: PropTypes.string.isRequired,
- /**
- * The options for the dropdown.
- */
- options: PropTypes.array.isRequired,
- /**
- * Sets the color of the dropdown.
- */
- color: PropTypes.string,
- /**
- * Sets if the dropdowns can be inline.
- */
- inline: PropTypes.bool,
- /**
- * Direction of the dropdown.
- */
- direction: PropTypes.string
- }
-
- static defaultProps = {
- label: "Dropdown",
- options: [
- { label: "Default Item" }
- ]
- }
-
render() {
const { caret, label, options, color, inline, direction } = this.props
@@ -84,6 +50,28 @@ class Dropdown extends React.Component {
}
}
+Dropdown.propTypes = {
+ /** Show a caret on the toggle. */
+ caret: PropTypes.bool,
+ /** Label for the dropdown button. */
+ label: PropTypes.string.isRequired,
+ /** The options for the dropdown. */
+ options: PropTypes.array.isRequired,
+ /** Sets the color of the dropdown. */
+ color: PropTypes.string,
+ /** Sets if the dropdowns can be inline. */
+ inline: PropTypes.bool,
+ /** Direction of the dropdown. */
+ direction: PropTypes.string
+}
+
+Dropdown.defaultProps = {
+ label: "Dropdown",
+ options: [
+ { label: "Default Item" }
+ ]
+}
+
export { Dropdown }
export default Dropdown
\ No newline at end of file
diff --git a/src/components/InfoArea/InfoArea.jsx b/src/components/InfoArea/InfoArea.jsx
index eef24ee..11094ea 100644
--- a/src/components/InfoArea/InfoArea.jsx
+++ b/src/components/InfoArea/InfoArea.jsx
@@ -30,48 +30,6 @@ class InfoArea extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * Color of the blob for the info area
- */
- color: PropTypes.string,
- /**
- * Icon for the blob to use
- */
- icon: PropTypes.node.isRequired,
- /**
- * Title of the info area. REQUIRED
- */
- title: PropTypes.string.isRequired,
- /**
- * Description of the info area.
- */
- description: PropTypes.string,
- /**
- * Color of the icon.
- */
- iconColor: PropTypes.string,
- /**
- * Determines if the icon and blob will hover vertically over text.
- */
- hover: PropTypes.bool.isRequired,
- /**
- * An appendable object. Usually a button link.
- */
- append: PropTypes.node,
- /**
- * Hides the blob. No need for the color prop if the blob is hidden!
- */
- noBlob: PropTypes.bool
- }
-
- static defaultProps = {
- color: "black",
- icon: ,
- iconColor: "primary",
- hover: true
- }
-
/**
* getBlobByColor
* ===========
@@ -126,6 +84,32 @@ class InfoArea extends React.Component {
}
}
+InfoArea.propTypes = {
+ /** Color of the blob for the info area */
+ color: PropTypes.string,
+ /** Icon for the blob to use */
+ icon: PropTypes.node.isRequired,
+ /** Title of the info area. REQUIRED */
+ title: PropTypes.string.isRequired,
+ /** Description of the info area. */
+ description: PropTypes.string,
+ /** Color of the icon. */
+ iconColor: PropTypes.string,
+ /** Determines if the icon and blob will hover vertically over text. */
+ hover: PropTypes.bool.isRequired,
+ /** An appendable object. Usually a button link. */
+ append: PropTypes.node,
+ /** Hides the blob. No need for the color prop if the blob is hidden! */
+ noBlob: PropTypes.bool
+}
+
+InfoArea.defaultProps = {
+ color: "black",
+ icon: ,
+ iconColor: "primary",
+ hover: true
+}
+
export { InfoArea }
export default InfoArea
\ No newline at end of file
diff --git a/src/components/Progress/Progress.jsx b/src/components/Progress/Progress.jsx
index 2b7bd76..c56f4be 100644
--- a/src/components/Progress/Progress.jsx
+++ b/src/components/Progress/Progress.jsx
@@ -32,42 +32,6 @@ class Progress extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The value of the progress bar.
- */
- value: PropTypes.number,
- /**
- * The maximum value of the progress bar.
- */
- max: PropTypes.number,
- /**
- * The label for the progress bar. No label for the multi-progress bar.
- */
- label: PropTypes.string,
- /**
- * The color of the progress bar.
- */
- color: PropTypes.string,
- /**
- * Has multiple bars.
- */
- multi: PropTypes.bool,
- /**
- * The list of values for a multi-progress bar.
- */
- values: PropTypes.array,
- /**
- * Sets a progress bar as striped.
- */
- striped: PropTypes.bool
- }
-
- static defaultProps = {
- max: 100,
- label: "Default"
- }
-
render() {
const { value, max, label, color, multi, values, striped } = this.props
@@ -94,6 +58,28 @@ class Progress extends React.Component {
}
}
+Progress.propTypes = {
+ /** The value of the progress bar. */
+ value: PropTypes.number,
+ /** The maximum value of the progress bar. */
+ max: PropTypes.number,
+ /** The label for the progress bar. No label for the multi-progress bar. */
+ label: PropTypes.string,
+ /** The color of the progress bar. */
+ color: PropTypes.string,
+ /** Has multiple bars. */
+ multi: PropTypes.bool,
+ /** The list of values for a multi-progress bar. */
+ values: PropTypes.array,
+ /** Sets a progress bar as striped. */
+ striped: PropTypes.bool
+}
+
+Progress.defaultProps = {
+ max: 100,
+ label: "Default"
+}
+
export { Progress }
export default Progress
\ No newline at end of file
diff --git a/src/components/Radio/Radio.jsx b/src/components/Radio/Radio.jsx
index 1b170d8..631482e 100644
--- a/src/components/Radio/Radio.jsx
+++ b/src/components/Radio/Radio.jsx
@@ -32,37 +32,6 @@ class Radio extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The label text.
- */
- label: PropTypes.string,
- /**
- * Function to handle change.
- */
- onChange: PropTypes.func,
- /**
- * Value of the radio.
- */
- value: PropTypes.string,
- /**
- * Name of the group that radios belong to. REQUIRED!
- */
- name: PropTypes.string.isRequired,
- /**
- * Sets whether the checkbox is inline or not.
- */
- inline: PropTypes.bool,
- /**
- * Sets whether the checkbox is enabled or disabled.
- */
- disabled: PropTypes.bool
- }
-
- static defaultProps = {
- label: "Default text!"
- }
-
render() {
const { label, onChange, value, name, inline, disabled } = this.props
@@ -86,6 +55,25 @@ class Radio extends React.Component {
}
}
+Radio.propTypes = {
+ /** The label text. */
+ label: PropTypes.string,
+ /** Function to handle change. */
+ onChange: PropTypes.func,
+ /** Value of the radio. */
+ value: PropTypes.string,
+ /** Name of the group that radios belong to. REQUIRED! */
+ name: PropTypes.string.isRequired,
+ /** Sets whether the checkbox is inline or not. */
+ inline: PropTypes.bool,
+ /** Sets whether the checkbox is enabled or disabled. */
+ disabled: PropTypes.bool
+}
+
+Radio.defaultProps = {
+ label: "Default text!"
+}
+
export { Radio }
export default Radio
\ No newline at end of file
diff --git a/src/components/Select/Select.jsx b/src/components/Select/Select.jsx
index 0e750ef..91e89ff 100644
--- a/src/components/Select/Select.jsx
+++ b/src/components/Select/Select.jsx
@@ -38,42 +38,6 @@ class Select extends React.Component {
this.handleChange = this.handleChange.bind(this)
}
- static propTypes = {
- /**
- * The placeholder for the select dropdown.
- */
- placeholder: PropTypes.string,
- /**
- * The color of the select dropdown.
- */
- color: PropTypes.string,
- /**
- * Sets if it multiple options are selectable
- */
- isMulti: PropTypes.bool,
- /**
- * Options to choose from for the select.
- */
- options: PropTypes.array.isRequired,
- /**
- * The function that processes changes to the selector.
- */
- onChange: function(props, propName, componentName) {
- var fn = props[propName];
- if(!fn.prototype ||
- (typeof fn.prototype.constructor !== 'function' &&
- fn.prototype.constructor.length !== 1)) {
- return new Error(propName + 'must be a function with an argument!');
- }
- }
- }
-
- static defaultProps = {
- placeholder: "Pick an Option!",
- color: "primary",
- options: [ "Option A", "Option B" ]
- }
-
componentWillMount() {
const { options } = this.props
@@ -107,6 +71,32 @@ class Select extends React.Component {
}
}
+Select.propTypes = {
+ /** The placeholder for the select dropdown. */
+ placeholder: PropTypes.string,
+ /** The color of the select dropdown. */
+ color: PropTypes.string,
+ /** Sets if it multiple options are selectable */
+ isMulti: PropTypes.bool,
+ /** Options to choose from for the select. */
+ options: PropTypes.array.isRequired,
+ /** The function that processes changes to the selector. */
+ onChange: function(props, propName, componentName) {
+ var fn = props[propName];
+ if(!fn.prototype ||
+ (typeof fn.prototype.constructor !== 'function' &&
+ fn.prototype.constructor.length !== 1)) {
+ return new Error(propName + 'must be a function with an argument!');
+ }
+ }
+}
+
+Select.defaultProps = {
+ placeholder: "Pick an Option!",
+ color: "primary",
+ options: [ "Option A", "Option B" ]
+}
+
export { Select }
export default Select
\ No newline at end of file
diff --git a/src/components/Slider/Slider.jsx b/src/components/Slider/Slider.jsx
index e630fae..47cb431 100644
--- a/src/components/Slider/Slider.jsx
+++ b/src/components/Slider/Slider.jsx
@@ -45,36 +45,6 @@ class Slider extends React.Component {
});
}
- static propTypes = {
- /**
- * The color of the slider.
- */
- color: PropTypes.string,
- /**
- * The minimum range of the slider.
- */
- rangeMin: PropTypes.number,
- /**
- * The maximum range of the slider.
- */
- rangeMax: PropTypes.number,
- /**
- * The step size of the slider.
- */
- step: PropTypes.number,
- /**
- * The starting value or values for the slider.
- */
- start: PropTypes.number
- }
-
- static defaultProps = {
- rangeMin: 0,
- rangeMax: 100,
- step: 1,
- start: 40
- }
-
render() {
const { color } = this.props
@@ -84,6 +54,26 @@ class Slider extends React.Component {
}
}
+Slider.propTypes = {
+ /** The color of the slider. */
+ color: PropTypes.string,
+ /** The minimum range of the slider. */
+ rangeMin: PropTypes.number,
+ /** The maximum range of the slider. */
+ rangeMax: PropTypes.number,
+ /** The step size of the slider. */
+ step: PropTypes.number,
+ /** The starting value or values for the slider. */
+ start: PropTypes.number
+}
+
+Slider.defaultProps = {
+ rangeMin: 0,
+ rangeMax: 100,
+ step: 1,
+ start: 40
+}
+
export { Slider }
export default Slider
\ No newline at end of file
diff --git a/src/components/Switch/Switch.jsx b/src/components/Switch/Switch.jsx
index 64105bf..7eed838 100644
--- a/src/components/Switch/Switch.jsx
+++ b/src/components/Switch/Switch.jsx
@@ -34,48 +34,6 @@ class Switch extends React.Component {
this.handleChange = this.handleChange.bind(this)
}
- static propTypes = {
- /**
- * The color when the switch is on.
- */
- onColor: PropTypes.string,
- /**
- * The color when the switch is off.
- */
- offColor: PropTypes.string,
- /**
- * The default value of the switch
- */
- defaultValue: PropTypes.bool,
- /**
- * The text when the switch is on.
- */
- onText: PropTypes.node,
- /**
- * The text when the switch is off.
- */
- offText: PropTypes.node,
- /**
- * Handles when the state of the switch changes.
- */
- onChange: function(props, propName, componentName) {
- var fn = props[propName];
- if(!fn.prototype ||
- (typeof fn.prototype.constructor !== 'function' &&
- fn.prototype.constructor.length !== 1)) {
- return new Error(propName + 'must be a function with an argument!');
- }
- }
- }
-
- static defaultProps = {
- onColor: "default",
- offColor: "default",
- defaultValue: false,
- onText: "",
- offText: ""
- }
-
handleChange(elem, state) {
const { onChange } = this.props
@@ -98,6 +56,36 @@ class Switch extends React.Component {
}
}
+Switch.propTypes = {
+ /** The color when the switch is on. */
+ onColor: PropTypes.string,
+ /** The color when the switch is off. */
+ offColor: PropTypes.string,
+ /** The default value of the switch */
+ defaultValue: PropTypes.bool,
+ /** The text when the switch is on. */
+ onText: PropTypes.node,
+ /** The text when the switch is off. */
+ offText: PropTypes.node,
+ /** Handles when the state of the switch changes. */
+ onChange: function(props, propName, componentName) {
+ var fn = props[propName];
+ if(!fn.prototype ||
+ (typeof fn.prototype.constructor !== 'function' &&
+ fn.prototype.constructor.length !== 1)) {
+ return new Error(propName + 'must be a function with an argument!');
+ }
+ }
+}
+
+Switch.defaultProps = {
+ onColor: "default",
+ offColor: "default",
+ defaultValue: false,
+ onText: "",
+ offText: ""
+}
+
export { Switch }
export default Switch
\ No newline at end of file
diff --git a/src/components/Tabs/Tabs.jsx b/src/components/Tabs/Tabs.jsx
index dbb3159..0e94ad8 100644
--- a/src/components/Tabs/Tabs.jsx
+++ b/src/components/Tabs/Tabs.jsx
@@ -43,43 +43,6 @@ class Tabs extends React.Component {
this.setState({ activeTab: tab })
}
- static propTypes = {
- /**
- * The list of labels for the tabs. Nodes are allowed (for using icons).
- */
- labels: PropTypes.array.isRequired,
- /**
- * The list of content for the tabs. Nodes are encouraged (it is content anyways).
- */
- content: PropTypes.array.isRequired,
- /**
- * Sets if the tab buttons are pills.
- */
- pills: PropTypes.bool,
- /**
- * The color of the pills.
- */
- pillColor: PropTypes.string,
- /**
- * Sets the pills to a vertical orientation.
- */
- vertical: PropTypes.bool,
- /**
- * Sets the horizontal placement of the tabs. [center, end]
- */
- tabPlacement: PropTypes.string,
- /**
- * Sets the placement of text. [left, center, right]
- */
- textPlacement: PropTypes.string
- }
-
- static defaultProps = {
- labels: [ "tab1", "tab2" ],
- content: [ "This is content for tab 1.", "This is content for tab 2." ],
- pillColor: "primary"
- }
-
render() {
const { labels, content, pills, pillColor, vertical, tabPlacement, textPlacement } = this.props
@@ -138,6 +101,29 @@ class Tabs extends React.Component {
}
}
+Tabs.propTypes = {
+ /** The list of labels for the tabs. Nodes are allowed (for using icons). */
+ labels: PropTypes.array.isRequired,
+ /** The list of content for the tabs. Nodes are encouraged (it is content anyways). */
+ content: PropTypes.array.isRequired,
+ /** Sets if the tab buttons are pills. */
+ pills: PropTypes.bool,
+ /** The color of the pills. */
+ pillColor: PropTypes.string,
+ /** Sets the pills to a vertical orientation. */
+ vertical: PropTypes.bool,
+ /** Sets the horizontal placement of the tabs. [center, end] */
+ tabPlacement: PropTypes.string,
+ /** Sets the placement of text. [left, center, right] */
+ textPlacement: PropTypes.string
+}
+
+Tabs.defaultProps = {
+ labels: [ "tab1", "tab2" ],
+ content: [ "This is content for tab 1.", "This is content for tab 2." ],
+ pillColor: "primary"
+}
+
export { Tabs }
export default Tabs
\ No newline at end of file
diff --git a/src/components/Tags/Tags.jsx b/src/components/Tags/Tags.jsx
index 2e020ca..ad5a13e 100644
--- a/src/components/Tags/Tags.jsx
+++ b/src/components/Tags/Tags.jsx
@@ -40,37 +40,6 @@ class Tags extends React.Component {
this.handleTags = this.handleTags.bind(this)
}
- static propTypes = {
- /**
- * The default list of tags to show.
- */
- tags: PropTypes.array,
- /**
- * The color of the tags.
- */
- color: PropTypes.string,
- /**
- * The function that processes changes to tags.
- */
- onChange: function(props, propName, componentName) {
- var fn = props[propName];
- if(!fn.prototype ||
- (typeof fn.prototype.constructor !== 'function' &&
- fn.prototype.constructor.length !== 1)) {
- return new Error(propName + 'must be a function with an argument!');
- }
- },
- /**
- * Sets the tags to use uppercase.
- */
- uppercase: PropTypes.bool
- }
-
- static defaultProps = {
- tags: [],
- color: "info"
- }
-
handleTags(tags) {
const { onChange } = this.props
@@ -93,6 +62,29 @@ class Tags extends React.Component {
}
}
+Tags.propTypes = {
+ /** The default list of tags to show. */
+ tags: PropTypes.array,
+ /** The color of the tags. */
+ color: PropTypes.string,
+ /** The function that processes changes to tags. */
+ onChange: function(props, propName, componentName) {
+ var fn = props[propName];
+ if(!fn.prototype ||
+ (typeof fn.prototype.constructor !== 'function' &&
+ fn.prototype.constructor.length !== 1)) {
+ return new Error(propName + 'must be a function with an argument!');
+ }
+ },
+ /** Sets the tags to use uppercase. */
+ uppercase: PropTypes.bool
+}
+
+Tags.defaultProps = {
+ tags: [],
+ color: "info"
+}
+
export { Tags }
export default Tags
\ No newline at end of file
diff --git a/src/components/Text/Text.jsx b/src/components/Text/Text.jsx
index 7c6090f..af85d57 100644
--- a/src/components/Text/Text.jsx
+++ b/src/components/Text/Text.jsx
@@ -30,63 +30,6 @@ class Text extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The children. Likely text or links or other stuff.
- */
- children: PropTypes.node.isRequired,
- /**
- * The tag to use for the element to be.
- */
- tag: PropTypes.string,
- /**
- * The display header to use. [1-4]
- */
- display: PropTypes.number,
- /**
- * Mutes the text.
- */
- muted: PropTypes.bool,
- /**
- * Adds lead styling to the text.
- */
- lead: PropTypes.bool,
- /**
- * Adds color to the text.
- */
- color: PropTypes.color,
- /**
- * Keeps the text from expanding the width of the line.
- */
- inline: PropTypes.bool,
- /**
- * The additional classes to add.
- */
- className: PropTypes.string,
- /**
- * The styles to use.
- */
- style: PropTypes.object,
- /**
- * The font to use.
- */
- font: PropTypes.object,
- /**
- * The size of the font.
- */
- size: PropTypes.string,
- /**
- * The weight of the font.
- */
- weight: PropTypes.string
- }
-
- static defaultProps = {
- children: "Bruh where the text at.",
- tag: "p",
- className: ""
- }
-
render() {
const { children, display, muted, lead, color, inline, tag: Tag, className, style, font, size, weight } = this.props
@@ -102,6 +45,39 @@ class Text extends React.Component {
}
}
+Text.propTypes = {
+ /** The children. Likely text or links or other stuff. */
+ children: PropTypes.node.isRequired,
+ /** The tag to use for the element to be. */
+ tag: PropTypes.string,
+ /** The display header to use. [1-4] */
+ display: PropTypes.number,
+ /** Mutes the text. */
+ muted: PropTypes.bool,
+ /** Adds lead styling to the text. */
+ lead: PropTypes.bool,
+ /** Adds color to the text. */
+ color: PropTypes.color,
+ /** Keeps the text from expanding the width of the line. */
+ inline: PropTypes.bool,
+ /** The additional classes to add. */
+ className: PropTypes.string,
+ /** The styles to use. */
+ style: PropTypes.object,
+ /** The font to use. */
+ font: PropTypes.object,
+ /** The size of the font. */
+ size: PropTypes.string,
+ /** The weight of the font. */
+ weight: PropTypes.string
+}
+
+Text.defaultProps = {
+ children: "Bruh where the text at.",
+ tag: "p",
+ className: ""
+}
+
export { Text }
export default Text
\ No newline at end of file
diff --git a/src/components/TextInput/TextInput.jsx b/src/components/TextInput/TextInput.jsx
index e19cacd..73fc899 100644
--- a/src/components/TextInput/TextInput.jsx
+++ b/src/components/TextInput/TextInput.jsx
@@ -47,50 +47,6 @@ class TextInput extends React.Component {
this.setState({ focused: "" })
}
- static propTypes = {
- /**
- * Text to place into input field as a placeholder.
- */
- placeholder: PropTypes.string,
- /**
- * Text to prepend to the beginning of the input.
- */
- prepend: PropTypes.node,
- /**
- * Text to append to the beginning of the input.
- */
- append: PropTypes.node,
- /**
- * Size of the input field. [sm, lg]
- */
- size: PropTypes.string,
- /**
- * A function to handle when text is changed.
- */
- onChange: PropTypes.func,
- /**
- * The label to be used above the form input.
- */
- formLabel: PropTypes.string,
- /**
- * Whether to use a form or regular input. Will override: size, append, and prepend.
- */
- form: PropTypes.bool,
- /**
- * Sets the classes used for the form group. Useful for applying if a field is good (has-success) or bad (has-danger).
- */
- formClassName: PropTypes.string,
- /**
- * Sets the class name used for the regular input groups. Useful for applying if a field is good (has-success) or bad (has-danger).
- */
- regClassName: PropTypes.string
- }
-
- static defaultProps = {
- formClassName: "",
- regClassName: ""
- }
-
render() {
const { onChange, placeholder, prepend, append, size, form, formLabel, formClassName, regClassName } = this.props
@@ -138,6 +94,32 @@ class TextInput extends React.Component {
}
}
+TextInput.propTypes = {
+ /** Text to place into input field as a placeholder. */
+ placeholder: PropTypes.string,
+ /** Text to prepend to the beginning of the input. */
+ prepend: PropTypes.node,
+ /** Text to append to the beginning of the input. */
+ append: PropTypes.node,
+ /** Size of the input field. [sm, lg] */
+ size: PropTypes.string,
+ /** A function to handle when text is changed. */
+ onChange: PropTypes.func,
+ /** The label to be used above the form input. */
+ formLabel: PropTypes.string,
+ /** Whether to use a form or regular input. Will override: size, append, and prepend. */
+ form: PropTypes.bool,
+ /** Sets the classes used for the form group. Useful for applying if a field is good (has-success) or bad (has-danger). */
+ formClassName: PropTypes.string,
+ /** Sets the class name used for the regular input groups. Useful for applying if a field is good (has-success) or bad (has-danger). */
+ regClassName: PropTypes.string
+}
+
+TextInput.defaultProps = {
+ formClassName: "",
+ regClassName: ""
+}
+
export { TextInput }
export default TextInput
\ No newline at end of file
diff --git a/src/components/ToolTip/ToolTip.jsx b/src/components/ToolTip/ToolTip.jsx
index 6ed1e19..762e4a5 100644
--- a/src/components/ToolTip/ToolTip.jsx
+++ b/src/components/ToolTip/ToolTip.jsx
@@ -32,30 +32,6 @@ class ToolTip extends React.Component {
super(props)
}
- static propTypes = {
- /**
- * The placement of the tooltip. [top, bottom, left, right]
- */
- placement: PropTypes.string.isRequired,
- /**
- * The target identifier of the element the tooltip should pop up at.
- */
- target: PropTypes.string.isRequired,
- /**
- * The delay of the tooltip.
- */
- delay: PropTypes.number,
- /**
- * The label to appear on the tooltip.
- */
- label: PropTypes.string.isRequired
- }
-
- static defaultProps = {
- placement: "top",
- delay: 0
- }
-
render() {
const { placement, target, delay, label } = this.props
@@ -67,6 +43,22 @@ class ToolTip extends React.Component {
}
}
+ToolTip.propTypes = {
+ /** The placement of the tooltip. [top, bottom, left, right] */
+ placement: PropTypes.string.isRequired,
+ /** The target identifier of the element the tooltip should pop up at. */
+ target: PropTypes.string.isRequired,
+ /** The delay of the tooltip. */
+ delay: PropTypes.number,
+ /** The label to appear on the tooltip. */
+ label: PropTypes.string.isRequired
+}
+
+ToolTip.defaultProps = {
+ placement: "top",
+ delay: 0
+}
+
export { ToolTip }
export default ToolTip
\ No newline at end of file