Merge branch 'new.create-workspace' of github.com:RocketChat/Rocket.Chat.ReactNative into new.create-workspace
This commit is contained in:
commit
996b3242ea
|
@ -17,6 +17,7 @@ interface IButtonProps {
|
||||||
color: string;
|
color: string;
|
||||||
fontSize: any;
|
fontSize: any;
|
||||||
style: any;
|
style: any;
|
||||||
|
styleText?: any;
|
||||||
testID: string;
|
testID: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +49,8 @@ export default class Button extends React.PureComponent<Partial<IButtonProps>, a
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { title, type, onPress, disabled, backgroundColor, color, loading, style, theme, fontSize, ...otherProps } = this.props;
|
const { title, type, onPress, disabled, backgroundColor, color, loading, style, theme, fontSize, styleText, ...otherProps } =
|
||||||
|
this.props;
|
||||||
const isPrimary = type === 'primary';
|
const isPrimary = type === 'primary';
|
||||||
|
|
||||||
let textColor = isPrimary ? themes[theme!].buttonText : themes[theme!].bodyText;
|
let textColor = isPrimary ? themes[theme!].buttonText : themes[theme!].bodyText;
|
||||||
|
@ -72,7 +74,7 @@ export default class Button extends React.PureComponent<Partial<IButtonProps>, a
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<ActivityIndicator color={textColor} />
|
<ActivityIndicator color={textColor} />
|
||||||
) : (
|
) : (
|
||||||
<Text style={[styles.text, { color: textColor }, fontSize && { fontSize }]} accessibilityLabel={title}>
|
<Text style={[styles.text, { color: textColor }, fontSize && { fontSize }, styleText]} accessibilityLabel={title}>
|
||||||
{title}
|
{title}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -191,7 +191,7 @@ class ServerDropdown extends Component {
|
||||||
const { servers } = this.state;
|
const { servers } = this.state;
|
||||||
const { theme, isMasterDetail, insets } = this.props;
|
const { theme, isMasterDetail, insets } = this.props;
|
||||||
const maxRows = 4;
|
const maxRows = 4;
|
||||||
const initialTop = 41 + Math.min(servers.length, maxRows) * ROW_HEIGHT;
|
const initialTop = 87 + Math.min(servers.length, maxRows) * ROW_HEIGHT;
|
||||||
const statusBarHeight = insets?.top ?? 0;
|
const statusBarHeight = insets?.top ?? 0;
|
||||||
const heightDestination = isMasterDetail ? headerHeight + statusBarHeight : 0;
|
const heightDestination = isMasterDetail ? headerHeight + statusBarHeight : 0;
|
||||||
const translateY = this.animatedValue.interpolate({
|
const translateY = this.animatedValue.interpolate({
|
||||||
|
@ -249,6 +249,7 @@ class ServerDropdown extends Component {
|
||||||
testID='rooms-list-header-create-workspace-button'
|
testID='rooms-list-header-create-workspace-button'
|
||||||
style={styles.buttonCreateWorkspace}
|
style={styles.buttonCreateWorkspace}
|
||||||
color={themes[theme].tintColor}
|
color={themes[theme].tintColor}
|
||||||
|
styleText={[styles.serverHeaderAdd, { textAlign: 'center' }]}
|
||||||
/>
|
/>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue