diff --git a/packages/docs/src/pages/components/card.js b/packages/docs/src/pages/components/card.js
index d47cdcb..78334d5 100644
--- a/packages/docs/src/pages/components/card.js
+++ b/packages/docs/src/pages/components/card.js
@@ -1,6 +1,6 @@
import React from 'react'
import { ThemeProvider, Card, Stack, Link, Text } from 'react-ui'
-import { Page, Example, Section, Table, Para } from '../../components'
+import { Page, Props, Example, Section, Table, Para } from '../../components'
const Documentation = () => {
return (
@@ -16,6 +16,19 @@ const Documentation = () => {
+
+
@@ -71,6 +84,61 @@ const Documentation = () => {
`}
+
+
+
+
+
+
+
+ 09:15
+
+ AMS
+
+
+
+ 8h 35
+ Direct
+
+
+ 11:50
+
+ JFK
+
+
+
+
+
+
+ {`
+
+
+
+
+
+ 09:15
+ AMS
+
+
+
+ 8h 35
+ Direct
+
+
+
+ 11:50
+ JFK
+
+
+
+
+
+ `}
+
diff --git a/packages/docs/src/pages/components/input.js b/packages/docs/src/pages/components/input.js
index 9b17df5..fef3325 100644
--- a/packages/docs/src/pages/components/input.js
+++ b/packages/docs/src/pages/components/input.js
@@ -28,6 +28,12 @@ const Documentation = () => {
description:
'type of avatar, example: text, password, number, etc.',
default: 'text'
+ },
+ {
+ name: 'fullWidth',
+ type: 'boolean',
+ description: 'Make input take 100% width of the container',
+ default: 'false'
}
]}
/>
@@ -54,6 +60,17 @@ const Documentation = () => {
`}
+
+
+
+
+
+
+ {`
+
+ `}
+
+
diff --git a/packages/docs/src/pages/components/select.js b/packages/docs/src/pages/components/select.js
index e23d6bc..c816104 100644
--- a/packages/docs/src/pages/components/select.js
+++ b/packages/docs/src/pages/components/select.js
@@ -36,6 +36,12 @@ const Documentation = () => {
name: '+',
type: 'props of Input',
description: ''
+ },
+ {
+ name: 'fullWidth',
+ type: 'boolean',
+ description: 'Make select take 100% width of the container',
+ default: 'false'
}
]}
/>
@@ -88,6 +94,27 @@ const Documentation = () => {
`}
+
+
+
+
+
+
+ {`
+
+ `}
+
+
diff --git a/packages/docs/src/pages/components/textarea.js b/packages/docs/src/pages/components/textarea.js
index 631af97..b1344a5 100644
--- a/packages/docs/src/pages/components/textarea.js
+++ b/packages/docs/src/pages/components/textarea.js
@@ -34,6 +34,12 @@ const Documentation = () => {
name: '+',
type: 'props of Input',
description: ''
+ },
+ {
+ name: 'fullWidth',
+ type: 'boolean',
+ description: 'Make textarea take 100% width of the container',
+ default: 'false'
}
]}
/>
@@ -58,6 +64,17 @@ const Documentation = () => {
`}
+
+
+
+
+
+
+ {`
+
+ `}
+
+
diff --git a/packages/react-ui/src/components/card/index.js b/packages/react-ui/src/components/card/index.js
index e3cdc30..98d7de3 100644
--- a/packages/react-ui/src/components/card/index.js
+++ b/packages/react-ui/src/components/card/index.js
@@ -1,18 +1,26 @@
import React from 'react'
+import PropTypes from 'prop-types'
import { Element } from '../../primitives'
import { styles } from './card.styles'
import { merge } from '../../utils'
-const Card = React.forwardRef(function Card({ css, ...props }, ref) {
+const Card = React.forwardRef(function Card({ fullWidth, css, ...props }, ref) {
+ let width = fullWidth ? '100%' : 'auto'
+
return (
)
})
+Card.propTypes = {
+ /** Description of an card prop */
+ fullWidth: PropTypes.bool
+}
+
export { Card }
diff --git a/packages/react-ui/src/components/input/index.js b/packages/react-ui/src/components/input/index.js
index b5a4cac..846b14a 100644
--- a/packages/react-ui/src/components/input/index.js
+++ b/packages/react-ui/src/components/input/index.js
@@ -5,14 +5,16 @@ import { styles } from './input.styles'
import { merge } from '../../utils'
/** Description of an input */
-const Input = React.forwardRef(function Input({ invalid, css, ...props }, ref) {
+const Input = React.forwardRef(function Input({ fullWidth, invalid, css, ...props }, ref) {
+ let width = fullWidth ? '100%' : 'auto'
+
return (
)
@@ -20,6 +22,7 @@ const Input = React.forwardRef(function Input({ invalid, css, ...props }, ref) {
Input.propTypes = {
/** Description of an input prop */
+ fullWidth: PropTypes.bool,
type: PropTypes.string
}
diff --git a/packages/react-ui/src/components/select/index.js b/packages/react-ui/src/components/select/index.js
index 0b128d3..989ef92 100644
--- a/packages/react-ui/src/components/select/index.js
+++ b/packages/react-ui/src/components/select/index.js
@@ -22,22 +22,26 @@ const usePlaceholder = props => {
return { placeholderStyles, onChange }
}
-const Select = React.forwardRef(function Select({ css, ...props }, ref) {
+const Select = React.forwardRef(function Select({ fullWidth, css, ...props }, ref) {
const { placeholderStyles, onChange } = usePlaceholder(props)
+ let width = fullWidth ? '100%' : 'auto'
return (
)
})
-Select.propTypes = {}
+Select.propTypes = {
+ /** Description of an select prop */
+ fullWidth: PropTypes.bool
+}
Select.defaultProps = {}
diff --git a/packages/react-ui/src/components/textarea/index.js b/packages/react-ui/src/components/textarea/index.js
index 29b3ce6..9845ed6 100644
--- a/packages/react-ui/src/components/textarea/index.js
+++ b/packages/react-ui/src/components/textarea/index.js
@@ -4,12 +4,14 @@ import { styles } from './textarea.styles'
import { Input } from '../input'
import { merge } from '../../utils'
-const Textarea = React.forwardRef(function Textarea({ css, ...props }, ref) {
+const Textarea = React.forwardRef(function Textarea({ fullWidth, css, ...props }, ref) {
+ let width = fullWidth ? '100%' : 'auto'
+
return (
@@ -17,6 +19,7 @@ const Textarea = React.forwardRef(function Textarea({ css, ...props }, ref) {
})
Textarea.propTypes = {
+ fullWidth: PropTypes.bool,
rows: PropTypes.number
}