mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 00:54:40 +01:00
more custom elements
This commit is contained in:
38
src/ui/components/common/DirInput.tsx
Normal file
38
src/ui/components/common/DirInput.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import React from 'react'
|
||||
import TextInput from './TextInput'
|
||||
import File from '../../../resources/icons/folder.svg'
|
||||
|
||||
import './DirInput.css'
|
||||
|
||||
interface IProps {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
interface IState {
|
||||
value: string
|
||||
}
|
||||
|
||||
export default class DirInput extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
value: props.value || ''
|
||||
}
|
||||
}
|
||||
|
||||
handleFileSelect() {
|
||||
console.log('piss')
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='DirInput'>
|
||||
<TextInput value={this.state.value} placeholder='Set Game Location...' readOnly={true} />
|
||||
<div className="FileSelectIcon">
|
||||
<img src={File} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user