Attempt to at move app into app sub dir

This commit is contained in:
Kurt Hutten
2021-05-01 07:32:21 +10:00
parent 9db76458d1
commit 78677a99f8
220 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
import { Fragment } from 'react'
import InputText from 'src/components/InputText'
const ProfileTextInput = ({ fields, isEditable, onChange = () => {} }) => {
return (
<div>
<div
className="grid items-center"
style={{ gridTemplateColumns: 'auto 1fr' }}
>
{Object.entries(fields).map(([property, value]) => (
<Fragment key={property}>
<span className="capitalize text-gray-500 text-sm align-middle my-3">
{property}:
</span>
<InputText
className="text-xl"
value={value}
onChange={({ target }) =>
onChange({ ...fields, [property]: target.value })
}
isEditable={isEditable}
/>
</Fragment>
))}
</div>
</div>
)
}
export default ProfileTextInput

View File

@@ -0,0 +1,7 @@
import ProfileTextInput from './ProfileTextInput'
export const generated = () => {
return <ProfileTextInput />
}
export default { title: 'Components/ProfileTextInput' }

View File

@@ -0,0 +1,11 @@
import { render } from '@redwoodjs/testing'
import ProfileTextInput from './ProfileTextInput'
describe('ProfileTextInput', () => {
it('renders successfully', () => {
expect(() => {
render(<ProfileTextInput />)
}).not.toThrow()
})
})