-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3163 from builder-247/item-tooltip-rework
Item tooltip rework
- Loading branch information
Showing
10 changed files
with
355 additions
and
180 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import styled from 'styled-components'; | ||
import constants from '../constants'; | ||
import { formatValues } from '../../utility'; | ||
import React from 'react'; | ||
import propTypes from 'prop-types'; | ||
|
||
const Behavior = styled.div` | ||
position: relative; | ||
padding: 13px; | ||
color: #95a5a6; | ||
span { | ||
&:nth-child(2) { | ||
color: ${constants.primaryTextColor}; | ||
font-weight: 500; | ||
} | ||
&[type="Yes"] { | ||
color: ${constants.colorGreen}; | ||
} | ||
&[type="Strong Dispels Only"] { | ||
color: darkred; | ||
} | ||
&[type="No"] { | ||
color: ${constants.colorRed}; | ||
} | ||
&[type="Pure"] { | ||
color: ${constants.colorDamageTypePure}; | ||
} | ||
&[type="Physical"] { | ||
color: ${constants.colorDamageTypePhysical}; | ||
} | ||
&[type="Magical"] { | ||
color: ${constants.colorDamageTypeMagical}; | ||
} | ||
} | ||
`; | ||
|
||
const AbilityBehaviour = ({ ability }: any) => ( | ||
<Behavior> | ||
{ability.behavior ? <div><span>TARGET: </span><span>{formatValues(ability.behavior)}</span></div> : ''} | ||
{/*@ts-ignore*/} | ||
{ability.dmg_type ? <div><span>DAMAGE TYPE: </span><span type={ability.dmg_type}>{`${ability.dmg_type}`}</span></div> : ''} | ||
{/*@ts-ignore*/} | ||
{ability.bkbpierce ? <div><span>PIERCES DEBUFF IMMUNITY: </span><span type={ability.bkbpierce}>{`${ability.bkbpierce}`}</span></div> : ''} | ||
{/*@ts-ignore*/} | ||
{ability.dispellable ? <div><span>DISPELLABLE: </span><span type={ability.dispellable}>{`${ability.dispellable}`}</span></div> : ''} | ||
</Behavior> | ||
) | ||
|
||
export default AbilityBehaviour; | ||
|
||
AbilityBehaviour.propTypes = { | ||
ability: propTypes.shape({}).isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.