2023-12-07 17:08:22 +08:00
|
|
|
import React from 'react';
|
|
|
|
import {data as shared_data} from "./utils";
|
2023-11-30 17:26:17 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component that displays crate modes
|
|
|
|
*/
|
2023-12-07 17:08:22 +08:00
|
|
|
export function CrateMode({current, onChange}) {
|
|
|
|
return (
|
|
|
|
<div className="crate-mode">
|
|
|
|
{shared_data.crateModeOrder.map(item => (
|
|
|
|
<a
|
|
|
|
key={item}
|
|
|
|
className={current === item ? 'active' : ''}
|
2023-11-30 17:26:17 +08:00
|
|
|
|
2023-12-07 17:08:22 +08:00
|
|
|
href="#"
|
|
|
|
role="button">{shared_data.crateModes[item].name}</a>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2023-11-30 17:26:17 +08:00
|
|
|
|
2023-12-07 17:08:22 +08:00
|
|
|
//onClick={onChange(this, item)}
|