fix settings for mobile screen

This commit is contained in:
Tainan Felipe 2017-12-19 09:13:37 -02:00
parent d74d309be0
commit 523caf226d
3 changed files with 81 additions and 39 deletions

View File

@ -6,10 +6,12 @@
align-self: flex-start; align-self: flex-start;
padding: ($line-height-computed / 2) $line-height-computed; padding: ($line-height-computed / 2) $line-height-computed;
outline: none; outline: none;
@include mq($small-only) {
width: 100%
}
} }
.content { .content {
overflow: auto;
color: $color-text; color: $color-text;
font-weight: normal; font-weight: normal;
padding: $line-height-computed 0; padding: $line-height-computed 0;
@ -19,7 +21,6 @@
display: flex; display: flex;
padding: $line-height-computed 0; padding: $line-height-computed 0;
border-bottom: $border-size solid $color-gray-lighter; border-bottom: $border-size solid $color-gray-lighter;
flex-shrink: 0;
} }
.actions { .actions {

View File

@ -73,10 +73,12 @@ class Settings extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
const video = props.video; const {
const application = props.application; video,
const cc = props.cc; participants,
const participants = props.participants; cc,
application,
} = props;
this.state = { this.state = {
current: { current: {
@ -128,9 +130,16 @@ class Settings extends Component {
onSelect={this.handleSelectTab} onSelect={this.handleSelectTab}
selectedIndex={this.state.selectedTab} selectedIndex={this.state.selectedTab}
role="presentation" role="presentation"
selectedTabPanelClassName={styles.selectedTab}
> >
<TabList className={styles.tabList}> <TabList
<Tab className={styles.tabSelector} aria-labelledby="appTab"> className={styles.tabList}
>
<Tab
className={styles.tabSelector}
aria-labelledby="appTab"
selectedClassName={styles.selected}
>
<Icon iconName="application" className={styles.icon} /> <Icon iconName="application" className={styles.icon} />
<span id="appTab">{intl.formatMessage(intlMessages.appTabLabel)}</span> <span id="appTab">{intl.formatMessage(intlMessages.appTabLabel)}</span>
</Tab> </Tab>
@ -138,7 +147,11 @@ class Settings extends Component {
{/* <Icon iconName='video' className={styles.icon}/> */} {/* <Icon iconName='video' className={styles.icon}/> */}
{/* <span id="videoTab">{intl.formatMessage(intlMessages.videoTabLabel)}</span> */} {/* <span id="videoTab">{intl.formatMessage(intlMessages.videoTabLabel)}</span> */}
{/* </Tab> */} {/* </Tab> */}
<Tab className={styles.tabSelector} aria-labelledby="ccTab"> <Tab
className={styles.tabSelector}
aria-labelledby="ccTab"
selectedClassName={styles.selected}
>
<Icon iconName="user" className={styles.icon} /> <Icon iconName="user" className={styles.icon} />
<span id="ccTab">{intl.formatMessage(intlMessages.closecaptionTabLabel)}</span> <span id="ccTab">{intl.formatMessage(intlMessages.closecaptionTabLabel)}</span>
</Tab> </Tab>
@ -181,7 +194,7 @@ class Settings extends Component {
); );
} }
render() { render() {
const intl = this.props.intl; const { intl } = this.props;
return ( return (
<Modal <Modal

View File

@ -4,55 +4,83 @@
display: flex; display: flex;
flex-flow: row; flex-flow: row;
justify-content: flex-start; justify-content: flex-start;
@include mq($small-only) {
width: 100%;
flex-flow: column;
}
} }
.tabList { .tabList {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
flex-grow: 0; border: none;
border: none !important; padding: 0;
flex-shrink: 0; margin: 0;
border-right: 0.2rem solid #d4d9df; width: calc(100% / 3 * 1);
@include mq($small-only) {
width: 100%;
flex-flow: row;
flex-wrap: wrap;
justify-content: center;
}
} }
.icon { .icon {
margin-right: 0.7rem; margin-right: .5rem;
color: $color-gray-light; font-size: $font-size-large;
} }
.tabSelector { .tabSelector {
font-size: 0.9rem; font-size: 0.9rem;
padding: 0.1rem 0 !important; display: flex;
padding-right: 1.2rem !important;
display: flex !important;
flex-flow: row; flex-flow: row;
flex: 0 0 auto;
justify-content: flex-start; justify-content: flex-start;
border: none !important; border: none !important;
border-radius: 0 !important; padding: $md-padding-y $md-padding-x;
bottom: 0 !important;
margin: 0.5rem 0;
margin-right: 0.5rem;
transition: 0.3s color;
color: $color-gray-dark; color: $color-gray-dark;
border-radius: .2rem;
&:first-child { cursor: pointer;
margin-top: 0; margin-bottom: $sm-padding-y;
align-items: center;
flex-grow: 0;
min-width: 0;
& > span {
@extend %text-elipsis;
} }
&[aria-selected="true"] { @include mq($small-only) {
border-right: 0.2rem solid $color-primary !important; max-width: 100%;
padding-right: 1rem !important; margin-right: $sm-padding-x;
color: $color-link !important; & > .icon {
display: none;
&>.icon {
color: $color-link !important;
} }
} }
} }
.tabPanel { .selected {
flex-grow: 1; color: $color-white;
padding: 1rem; background-color: $color-primary;
padding-top: 0; font-weight: bold;
padding-right: 0;
& > .icon {
color: $color-white;
}
}
.tabPanel {
display: none;
margin-left: 1rem;
width: calc(100% / 3 * 2);
@include mq($small-only) {
width: 100%;
margin-left: 0;
margin-top: 1rem;
}
}
.selectedTab {
display: block;
} }