,
+ HTMLDivElement
+ > {
className?: string
stage: number
editable: boolean
interactive: boolean
- onClick?: () => void
+ onStarClick?: () => void
onFragmentClick?: (newStage: number) => void
onFragmentHover?: (newStage: number) => void
}
@@ -21,7 +25,8 @@ const TranscendenceStar = ({
interactive,
stage,
editable,
- onClick,
+ tabIndex,
+ onStarClick,
onFragmentClick,
onFragmentHover,
}: Props) => {
@@ -52,8 +57,8 @@ const TranscendenceStar = ({
}, [stage])
function handleClick() {
- if (onClick) {
- onClick()
+ if (onStarClick) {
+ onStarClick()
}
}
@@ -81,6 +86,7 @@ const TranscendenceStar = ({
className={starClasses}
onClick={editable ? handleClick : () => {}}
onMouseLeave={interactive ? handleMouseLeave : () => {}}
+ tabIndex={tabIndex}
>
{[...Array(NUM_FRAGMENTS)].map((e, i) => {
diff --git a/components/UncapIndicator/index.tsx b/components/UncapIndicator/index.tsx
index 286f1d6e..f90a4d19 100644
--- a/components/UncapIndicator/index.tsx
+++ b/components/UncapIndicator/index.tsx
@@ -9,6 +9,7 @@ interface Props {
type: 'character' | 'weapon' | 'summon'
rarity?: number
uncapLevel?: number
+ position: number
transcendenceStage?: number
editable: boolean
flb: boolean
@@ -81,7 +82,8 @@ const UncapIndicator = (props: Props) => {
stage={props.transcendenceStage}
editable={props.editable}
interactive={false}
- onClick={() => togglePopover(true)}
+ onStarClick={() => togglePopover(true)}
+ tabIndex={props.position * 7 + i + 1}
/>
)
}
@@ -94,7 +96,8 @@ const UncapIndicator = (props: Props) => {
empty={props.uncapLevel != null ? i >= props.uncapLevel : false}
key={`star_${i}`}
index={i}
- onClick={toggleStar}
+ onStarClick={toggleStar}
+ tabIndex={props.position * 7 + i + 1}
/>
)
}
@@ -107,7 +110,8 @@ const UncapIndicator = (props: Props) => {
empty={props.uncapLevel != null ? i >= props.uncapLevel : false}
key={`star_${i}`}
index={i}
- onClick={toggleStar}
+ onStarClick={toggleStar}
+ tabIndex={props.position * 7 + i + 1}
/>
)
}
@@ -119,7 +123,8 @@ const UncapIndicator = (props: Props) => {
empty={props.uncapLevel != null ? i >= props.uncapLevel : false}
key={`star_${i}`}
index={i}
- onClick={toggleStar}
+ onStarClick={toggleStar}
+ tabIndex={props.position * 7 + i + 1}
/>
)
}
@@ -129,7 +134,9 @@ const UncapIndicator = (props: Props) => {
) : (
''
diff --git a/components/UncapStar/index.tsx b/components/UncapStar/index.tsx
index 9b0969f7..5393a494 100644
--- a/components/UncapStar/index.tsx
+++ b/components/UncapStar/index.tsx
@@ -3,13 +3,17 @@ import classnames from 'classnames'
import './index.scss'
-interface Props {
+interface Props
+ extends React.DetailedHTMLProps<
+ React.DialogHTMLAttributes,
+ HTMLDivElement
+ > {
empty: boolean
special: boolean
flb: boolean
ulb: boolean
index: number
- onClick: (index: number, empty: boolean) => void
+ onStarClick: (index: number, empty: boolean) => void
}
const UncapStar = (props: Props) => {
@@ -23,10 +27,12 @@ const UncapStar = (props: Props) => {
})
function clicked() {
- props.onClick(props.index, props.empty)
+ props.onStarClick(props.index, props.empty)
}
- return
+ return (
+
+ )
}
UncapStar.defaultProps = {
diff --git a/components/WeaponUnit/index.tsx b/components/WeaponUnit/index.tsx
index 978c7710..8149f6a6 100644
--- a/components/WeaponUnit/index.tsx
+++ b/components/WeaponUnit/index.tsx
@@ -548,6 +548,7 @@ const WeaponUnit = ({
ulb={gridWeapon.object.uncap.ulb || false}
flb={gridWeapon.object.uncap.flb || false}
uncapLevel={gridWeapon.uncap_level}
+ position={gridWeapon.position}
updateUncap={passUncapData}
special={false}
/>