mod list colors and such

This commit is contained in:
SpikeHD
2022-07-21 23:46:51 -07:00
parent c659979851
commit f946cedb4d
8 changed files with 153 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
.ModHeader {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
width: 100%;
padding: 10px;
font-size: 20px;
font-weight: bold;
color: #fff;
background: rgba(77, 77, 77, 0.6);
}
.ModHeaderTitle {
}
.ModHeaderTitle:hover {
cursor: pointer;
}
.ModHeaderTitle.selected {
border-bottom: 2px solid #fff;
}

View File

@@ -0,0 +1,52 @@
import React from 'react'
import './ModHeader.css'
interface IProps {
headers: {
title: string
name: string
}[]
onChange: (value: string) => void
defaultHeader: string
}
interface IState {
selected: string
}
export class ModHeader extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props)
this.state = {
selected: this.props.defaultHeader,
}
}
setSelected(value: string) {
this.setState({
selected: value,
})
this.props.onChange(value)
}
render() {
return (
<div className="ModHeader">
{this.props.headers.map((header, index) => {
return (
<div
key={index}
className={`ModHeaderTitle ${this.state.selected === header.name ? 'selected' : ''}`}
onClick={() => this.setSelected(header.name)}
>
{header.title}
</div>
)
})}
</div>
)
}
}

View File

@@ -0,0 +1,6 @@
.ModList {
width: 100%;
height: 100%;
background-color: rgba(106, 105, 106, 0.6);
}

View File

@@ -0,0 +1,21 @@
import React from 'react'
import './ModList.css'
interface IProps {
sort: string
}
interface IState {
modList: string[]
}
export class ModList extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props)
}
render() {
return <div className="ModList"></div>
}
}

View File

@@ -0,0 +1 @@
export {}