Commit Graph

37 Commits

Author SHA1 Message Date
Flosch
405abf22d4 Add CustomInput to AnyPropsExample and GenericPropsExample tests 2018-06-07 19:04:58 +02:00
Flosch
9afbbb00fb Correct tests 2018-06-06 16:26:42 +02:00
Flosch
98ba0b7e2e [reactstrap] Add DropdownMenu persist and modifiers props 2018-06-06 13:27:49 +02:00
Flosch
7ea7631815 [reactstrap] Add setActiveFromChild prop 2018-06-06 13:26:27 +02:00
Flosch
ccbd12e286 [reactstrap] Add borderless type to Table 2018-06-06 13:23:18 +02:00
Flosch
c77275b10c [reactstrap] Add Typings for CustomInput 2018-06-06 13:20:41 +02:00
FaithForHumans
be6be65e15 Updating tests 2018-05-29 15:58:05 -05:00
FaithForHumans
1c012ab4f0 Replacing reactstrap components with generics. 2018-05-28 23:29:43 -05:00
Sean Kelley
ee05115ac7 Reactstrap: update types for innerRefs.
Refer to React's Ref<T> class instead. This way the types of the innerRef reflect
whatever the installed typings for React say a ref can be.
2018-05-21 14:10:14 -07:00
Sean Kelley
4563f43f69 Reactstrap: StatelessComponent -> Component where appropriate.
(See also #24846 for prior work.)

Update Reactstrap to declare components that aren't stateless functional components
as regular components. This allows consumers to use ref-related APIs, namely, the
`ref` prop and `forwardRef`.

Previously, Typescript would outright deny passing `ref`, and any attempts to use
`forwardRef` would cause very confusing type errors claiming that the component class
you were trying to refer to didn't exist (?!).

Note that many components actually are implemented as stateless components, and as such
their typings haven't been changed.

I found the list of components needing this update by checking out current master
of reactstrap (1d20d6d52c258428df39429e09c84b0ddcac76ee), then

```sh
cd src
rg 'extends (React.)?Component' -l | grep -v '__tests__'
```
2018-05-21 13:31:14 -07:00
Florent SCHILDKNECHT
6a7b69883e [reactstrap] Correct FormGroups props typings (#25208) 2018-04-24 16:13:13 -07:00
Pat Gaffney
60f80dd6e2 reactstrap: Add Missing Prop Types (#25104)
* reactstrap: Add hideArrow PropType to <Popover/>

* reactstrap: Remove dropup prop in favor of direction for <Dropdown/>

* reactstrap: Update the version to 5.0 in index.d.ts header
2018-04-24 16:12:30 -07:00
Sean Kelley
cdb3807edb reactstrap: Input from StatelessComponent to React.Component subclass (#24846)
* reactstrap: Input from StatelessComponent to ComponentClass

`Input` is a full React component (`ComponentClass`), not a stateless component. In particular, this change allows consumers to pass `ref` to it (not legal with `StatelessComponent`), which useful for e.g. calling `HTMLInputElement#focus()`.

* ComponentClasss -> extends React.Component
2018-04-12 09:59:44 -07:00
Sami Mäki
ca578cd348 Update navbar props and examples.
Updated and checked components: Navbar, NavbarBrand, NavbarToggler.
2018-03-05 11:36:46 +02:00
Sami Mäki
e637f7eb20 Update navs props and examples.
Updated and checked components: Nav, NavItem, NavLink.
2018-03-05 11:36:46 +02:00
FaithForHumans
8644f396ba Adding prepend/append for input group addons.
Removing old cardblock, inputgroupbutton, and navdropdown components.
Adding new InputGroupbuttonDropdown
2018-02-02 18:51:51 -06:00
Kræn Hansen
5011030133 Renaming Input's size property to bsSize (#23219)
See
cc2bd1386f
2018-01-26 09:00:34 -08:00
Andy
219dd6df82 Fix 'prefer-readonly' lint failures (#22819) 2018-01-10 14:59:37 -08:00
Kurt Preston
52bc966699 [@types/reactstrap] Adding carousel components, removing Tether (#22512)
* Adding full Popper.js definition to Reactstrap

* Reactstrap: Updating Dropdown definitions, removing Tether

* Reactstrap: Adding Carousel components and test
2018-01-03 11:42:29 -08:00
Kurt Preston
e739200692 Updating Popover and Tooltip definitions 2017-12-08 23:40:11 -06:00
Keenan Jaenicke
6439a441c0 update export names and fix tests 2017-11-01 12:08:05 -04:00
b-szypelow
f7f81bced2 Reactstrap: Introduce typings for v5.0 (#20696)
* reactstrap: Create v4 subfolder

* reactstrap@5: change getRef to innerRef
2017-10-27 17:39:47 -07:00
Fábio Paiva
fff6a33a3d Creating CardBody definitions (#20283) 2017-10-10 09:30:59 -07:00
Fábio Paiva
faf18110df Fix NavbarBrand using the correct interface (#20280)
* Fix NavbarBrand using any

* Tests for reactstrap NavbarBrand properties
2017-10-09 15:57:49 -07:00
Fábio Paiva
5e4682a0ba Add new properties from Bootstrap Beta to Navbar (#19940)
Reactstrap Navbar new properties tests

Add contributor to be notified on changes
2017-09-26 11:42:31 -07:00
amikhalev
900168727f Added tests for reactstrap input update 2017-08-24 15:12:21 -06:00
amikhalev
1f1de1f591 Updated reactstrap DropdownMenu className type 2017-08-15 16:04:30 -06:00
Mikhail Morozov
1af3158a5d Reactstrap css modules (#18049)
* reactstrap css modules

* fixed module import

* removed package-lock.json from git index
2017-07-17 11:19:27 -07:00
Tanguy Krotoff
573083a518 Replace React.Component<(any|void|\{\}|null)> by React.Component
+ many manual adjustments
2017-06-21 09:48:37 +02:00
Tanguy Krotoff
ea9de8a518 Replace React.Component<(.*), (any|void|\{\}|null)> by React.Component<$1>
+ many manual adjustments
2017-06-19 13:35:50 +02:00
Yui
eef8a774f5 manually port fix from 16286 and address PR (#17003) 2017-06-08 15:50:41 -07:00
Mike Woodward
ad756d05b3 className type support for Uncontrolled Dropdown (#17075) 2017-06-08 15:30:24 -07:00
Arthur Ozga
3b3fb05596 Merge pull request #16244 from danilobjr/reactstrap
Reactstrap - extending some components with HTMLProps
2017-05-16 13:41:06 -07:00
Wayne Dela Cruz
56ce2fe50d DropdownItem onclick should be callback (#15926)
* React CSSProperties position made specific

* Add test for css position

* DropdownItem onClick is callback

DropdownItem onClick was an event. It should be a callback function

* Test DropdownItem onClick definitions
2017-05-04 09:53:01 -07:00
Danilo Barros
961c6fd498 feat(reactstrap): writing some tests 2017-05-01 15:57:34 -03:00
Andy
3d13ec5399 Lint react-* packages (#15526) 2017-03-30 14:11:46 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00