Make Extra toggle only display on Weapons tab
This commit is contained in:
parent
868d113fae
commit
c091e86f76
3 changed files with 23 additions and 10 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
.PartyNavigation {
|
.PartyNavigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 58px;
|
gap: 58px;
|
||||||
justify-content: right;
|
justify-content: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 760px;
|
max-width: 760px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Extra {
|
.Extra {
|
||||||
|
|
@ -13,4 +14,6 @@
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
}
|
}
|
||||||
|
|
@ -22,6 +22,17 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const PartySegmentedControl = (props: Props) => {
|
const PartySegmentedControl = (props: Props) => {
|
||||||
|
const extraToggle =
|
||||||
|
<div className="Extra">
|
||||||
|
Extra
|
||||||
|
<ToggleSwitch
|
||||||
|
name="Extra"
|
||||||
|
editable={props.editable}
|
||||||
|
checked={props.extra}
|
||||||
|
onChange={props.onCheckboxChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="PartyNavigation">
|
<div className="PartyNavigation">
|
||||||
<SegmentedControl>
|
<SegmentedControl>
|
||||||
|
|
@ -54,15 +65,13 @@ const PartySegmentedControl = (props: Props) => {
|
||||||
>Summons</Segment>
|
>Summons</Segment>
|
||||||
</SegmentedControl>
|
</SegmentedControl>
|
||||||
|
|
||||||
<div className="Extra">
|
{
|
||||||
Extra
|
(() => {
|
||||||
<ToggleSwitch
|
if (props.selectedTab == GridType.Weapon) {
|
||||||
name="Extra"
|
return extraToggle
|
||||||
editable={props.editable}
|
}
|
||||||
checked={props.extra}
|
})()
|
||||||
onChange={props.onCheckboxChange}
|
}
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 58px;
|
width: 58px;
|
||||||
|
height: 34px;
|
||||||
|
|
||||||
&-checkbox {
|
&-checkbox {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue