Skip to content

Commit 8304c1e

Browse files
committed
Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev
* 'dev' of github.com:soyjavi/react-toolbox: ListItem legend may be a node as well (react-toolbox#1496) Allow pass inverse to IconMenu (react-toolbox#1490) Fix media queries panel height calculations (react-toolbox#1467) Allow to change FontIcon for Tab by passing it into the factory (react-toolbox#1439) Added required?: boolean; (react-toolbox#1491)
2 parents 7db3e34 + a6eb5c5 commit 8304c1e

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

components/date_picker/DatePicker.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ export interface DatePickerProps extends ReactToolbox.Props {
191191
* Date object with the currently selected date.
192192
*/
193193
value?: Date | string;
194+
/**
195+
* Used in case the input is required.
196+
*/
197+
required?: boolean;
194198
}
195199

196200
export interface DatePickerLocale {

components/layout/theme.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,23 @@
7070
}
7171

7272
& .panel {
73+
height: calc(100vh - var(--appbar-height));
74+
max-height: calc(100vh - var(--appbar-height));
7375
top: var(--appbar-height);
7476

7577
&:not(.bodyScroll) {
76-
height: calc(100vh - var(--appbar-height));
77-
max-height: calc(100vh - var(--appbar-height));
7878
overflow-y: scroll;
7979
}
8080

8181
@media screen and (--xxs-viewport) and (--portrait) {
82+
height: calc(100vh - var(--appbar-height-m-portrait));
83+
max-height: calc(100vh - var(--appbar-height-m-portrait));
8284
top: var(--appbar-height-m-portrait);
8385
}
8486

8587
@media screen and (--xs-viewport) and (--landscape) {
88+
height: calc(100vh - var(--appbar-height-m-landscape));
89+
max-height: calc(100vh - var(--appbar-height-m-landscape));
8690
top: var(--appbar-height-m-landscape);
8791
}
8892
}

components/list/ListItemContent.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const factory = (ListItemText) => {
1515
PropTypes.node,
1616
]),
1717
children: PropTypes.node,
18-
legend: PropTypes.string,
18+
legend: PropTypes.oneOfType([
19+
PropTypes.string,
20+
PropTypes.node,
21+
]),
1922
theme: PropTypes.shape({
2023
auto: PropTypes.string,
2124
itemContentRoot: PropTypes.string,

components/menu/IconMenu.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export interface IconMenuProps extends ReactToolbox.Props {
2727
* @default true
2828
*/
2929
iconRipple?: boolean;
30+
/**
31+
* If true, the neutral colors are inverted. Useful if the icon is over a dark background.
32+
* @default false
33+
*/
34+
inverse?: boolean;
3035
/**
3136
* Transferred to the Menu component.
3237
* @default true

components/menu/IconMenu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const factory = (IconButton, Menu) => {
1616
PropTypes.element,
1717
]),
1818
iconRipple: PropTypes.bool,
19+
inverse: PropTypes.bool,
1920
menuRipple: PropTypes.bool,
2021
onClick: PropTypes.func,
2122
onHide: PropTypes.func,

components/tabs/Tab.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import classnames from 'classnames';
44
import { themr } from 'react-css-themr';
5-
import { FontIcon } from '../font_icon';
65
import { TABS } from '../identifiers';
76
import rippleFactory from '../ripple/Ripple';
7+
import InjectFontIcon from '../font_icon/FontIcon';
88

9-
const factory = (ripple) => {
9+
const factory = (ripple, FontIcon) => {
1010
class Tab extends Component {
1111
static propTypes = {
1212
active: PropTypes.bool,
@@ -77,7 +77,7 @@ const factory = (ripple) => {
7777
return ripple(Tab);
7878
};
7979

80-
const Tab = factory(rippleFactory({ centered: false }));
80+
const Tab = factory(rippleFactory({ centered: false }), InjectFontIcon);
8181
export default themr(TABS)(Tab);
8282
export { factory as tabFactory };
8383
export { Tab };

components/tabs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import theme from './theme.css';
99

1010
const applyTheme = Component => themr(TABS, theme)(Component);
1111
const ThemedTabContent = applyTheme(TabContent);
12-
const ThemedTab = applyTheme(tabFactory(themedRippleFactory({ centered: false })));
12+
const ThemedTab = applyTheme(tabFactory(themedRippleFactory({ centered: false }), FontIcon));
1313
const ThemedTabs = applyTheme(tabsFactory(ThemedTab, ThemedTabContent, FontIcon));
1414

1515
export { ThemedTab as Tab };

0 commit comments

Comments
 (0)